|
|
4b6aa8 |
From 6eb3c81faf1809f54334fc69d9916bd7949c1e93 Mon Sep 17 00:00:00 2001
|
|
|
4b6aa8 |
From: Jakub Filak <jfilak@redhat.com>
|
|
|
4b6aa8 |
Date: Tue, 21 Jan 2014 17:25:58 +0100
|
|
|
4b6aa8 |
Subject: [LIBREPORT PATCH 11/11] Remove Workflows tab in Preferences
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
Closes rhbz#1055633
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
|
4b6aa8 |
---
|
|
|
4b6aa8 |
src/gtk-helpers/config_dialog.c | 19 +++++++++----------
|
|
|
4b6aa8 |
1 file changed, 9 insertions(+), 10 deletions(-)
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
diff --git a/src/gtk-helpers/config_dialog.c b/src/gtk-helpers/config_dialog.c
|
|
|
4b6aa8 |
index cc98b9b..8276130 100644
|
|
|
4b6aa8 |
--- a/src/gtk-helpers/config_dialog.c
|
|
|
4b6aa8 |
+++ b/src/gtk-helpers/config_dialog.c
|
|
|
4b6aa8 |
@@ -206,7 +206,8 @@ GtkWidget *create_config_tab_content(const char *column_label,
|
|
|
4b6aa8 |
gtk_tree_view_append_column(GTK_TREE_VIEW(tv), column);
|
|
|
4b6aa8 |
/* "Please draw rows in alternating colors": */
|
|
|
4b6aa8 |
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tv), TRUE);
|
|
|
4b6aa8 |
- // TODO: gtk_tree_view_set_headers_visible(FALSE)? We have only one column anyway...
|
|
|
4b6aa8 |
+ /* Hide Column Headers because we have only one - 'Events' - rhbz#1055633 */
|
|
|
4b6aa8 |
+ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tv), FALSE);
|
|
|
4b6aa8 |
GtkTreeModel *model = gtk_tree_model_filter_new(GTK_TREE_MODEL(store), NULL);
|
|
|
4b6aa8 |
gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(model), config_filter_func, NULL, NULL);
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
@@ -287,6 +288,9 @@ GtkWindow *create_config_list_window(GHashTable *configs, GtkWindow *parent)
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
GtkWidget *main_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
|
|
|
4b6aa8 |
GtkWidget *config_nb = gtk_notebook_new();
|
|
|
4b6aa8 |
+ /* Hide Tabs because we have only one - 'Events' - rhbz#1055633 */
|
|
|
4b6aa8 |
+ gtk_notebook_set_show_tabs(GTK_NOTEBOOK(config_nb), FALSE);
|
|
|
4b6aa8 |
+
|
|
|
4b6aa8 |
gtk_box_pack_start(GTK_BOX(main_vbox), config_nb, 1, 1, 0);
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
/* we can't use this, because we want the workflows first and hashtable
|
|
|
4b6aa8 |
@@ -295,12 +299,12 @@ GtkWindow *create_config_list_window(GHashTable *configs, GtkWindow *parent)
|
|
|
4b6aa8 |
//g_hash_table_foreach(configs, (GHFunc)add_config_tabs, config_nb);
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
gpointer config = g_hash_table_lookup(configs, _("Workflows"));
|
|
|
4b6aa8 |
- if (config != NULL);
|
|
|
4b6aa8 |
- add_config_tabs(_("Workflows"), config, config_nb);
|
|
|
4b6aa8 |
+ if (config != NULL)
|
|
|
4b6aa8 |
+ add_config_tabs(_("Workflows"), config, config_nb);
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
config = g_hash_table_lookup(configs, _("Events"));
|
|
|
4b6aa8 |
- if (config != NULL);
|
|
|
4b6aa8 |
- add_config_tabs(_("Events"), config, config_nb);
|
|
|
4b6aa8 |
+ if (config != NULL)
|
|
|
4b6aa8 |
+ add_config_tabs(_("Events"), config, config_nb);
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
//buttons
|
|
|
4b6aa8 |
GtkWidget *btn_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
|
|
|
4b6aa8 |
@@ -344,11 +348,6 @@ void show_config_list_dialog(GtkWindow *parent)
|
|
|
4b6aa8 |
GHashTable *events = load_event_config_data();
|
|
|
4b6aa8 |
load_event_config_data_from_user_storage(events);
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
- GHashTable *workflows = load_workflow_config_data(WORKFLOWS_DIR);
|
|
|
4b6aa8 |
- load_workflow_config_data_from_user_storage(workflows);
|
|
|
4b6aa8 |
- GtkListStore *workflows_store = add_workflows_to_liststore(workflows);
|
|
|
4b6aa8 |
- g_hash_table_insert(confs, _("Workflows"), workflows_store);
|
|
|
4b6aa8 |
-
|
|
|
4b6aa8 |
GtkListStore *events_store = add_events_to_liststore(events);
|
|
|
4b6aa8 |
g_hash_table_insert(confs, _("Events"), events_store);
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
--
|
|
|
4b6aa8 |
1.8.3.1
|
|
|
4b6aa8 |
|