Blame SOURCES/0049-gui-clear-the-sensitive-cache-between-two-event-runs.patch

28bab8
From 567dd27e9b3e9098927923bf8c0c4c3a71307660 Mon Sep 17 00:00:00 2001
28bab8
From: Jakub Filak <jfilak@redhat.com>
28bab8
Date: Wed, 30 Jul 2014 13:44:02 +0200
28bab8
Subject: [LIBREPORT PATCH 49/93] gui: clear the sensitive cache between two
28bab8
 event runs
28bab8
28bab8
Was causing a SIGSEGV.
28bab8
28bab8
Related to rhbz#1069917
28bab8
28bab8
Signed-off-by: Jakub Filak <jfilak@redhat.com>
28bab8
---
28bab8
 src/gui-wizard-gtk/wizard.c | 25 +++++++++++++++++++++++++
28bab8
 1 file changed, 25 insertions(+)
28bab8
28bab8
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
28bab8
index 7cdd88b..3dcc756 100644
28bab8
--- a/src/gui-wizard-gtk/wizard.c
28bab8
+++ b/src/gui-wizard-gtk/wizard.c
28bab8
@@ -1166,6 +1166,31 @@ static void remove_tabs_from_notebook(GtkNotebook *notebook)
28bab8
         */
28bab8
         gtk_notebook_remove_page(notebook, 0); //we need to always the page 0
28bab8
     }
28bab8
+
28bab8
+    /* Turn off the changed callback during the update */
28bab8
+    g_signal_handler_block(g_tv_sensitive_sel, g_tv_sensitive_sel_hndlr);
28bab8
+
28bab8
+    g_current_highlighted_word = NULL;
28bab8
+
28bab8
+    GtkTreeIter iter;
28bab8
+    gboolean valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(g_ls_sensitive_list), &iter);
28bab8
+    while (valid)
28bab8
+    {
28bab8
+        char *text = NULL;
28bab8
+        search_item_t *word = NULL;
28bab8
+
28bab8
+        gtk_tree_model_get(GTK_TREE_MODEL(g_ls_sensitive_list), &iter,
28bab8
+                SEARCH_COLUMN_TEXT, &text,
28bab8
+                SEARCH_COLUMN_ITEM, &word,
28bab8
+                -1);
28bab8
+
28bab8
+        free(text);
28bab8
+        free(word);
28bab8
+
28bab8
+        valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(g_ls_sensitive_list), &iter);
28bab8
+    }
28bab8
+    gtk_list_store_clear(g_ls_sensitive_list);
28bab8
+    g_signal_handler_unblock(g_tv_sensitive_sel, g_tv_sensitive_sel_hndlr);
28bab8
 }
28bab8
 
28bab8
 static void append_item_to_ls_details(gpointer name, gpointer value, gpointer data)
28bab8
-- 
28bab8
1.8.3.1
28bab8