Blame SOURCES/0011-Remove-Workflows-tab-in-Preferences.patch

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