|
|
4b6aa8 |
From 66abae485c6028345f21e80803e093a4dda292b3 Mon Sep 17 00:00:00 2001
|
|
|
4b6aa8 |
From: Jakub Filak <jfilak@redhat.com>
|
|
|
4b6aa8 |
Date: Wed, 30 Jul 2014 13:46:57 +0200
|
|
|
4b6aa8 |
Subject: [LIBREPORT PATCH 50/93] gui: don't remove already removed
|
|
|
4b6aa8 |
GTimeoutSource
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
Was causing a GLib warning
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
Related to rhbz#1069917
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
|
4b6aa8 |
---
|
|
|
4b6aa8 |
src/gui-wizard-gtk/wizard.c | 11 +++++++----
|
|
|
4b6aa8 |
1 file changed, 7 insertions(+), 4 deletions(-)
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
|
|
4b6aa8 |
index 3dcc756..492feed 100644
|
|
|
4b6aa8 |
--- a/src/gui-wizard-gtk/wizard.c
|
|
|
4b6aa8 |
+++ b/src/gui-wizard-gtk/wizard.c
|
|
|
4b6aa8 |
@@ -2911,17 +2911,20 @@ static void on_sensitive_word_selection_changed(GtkTreeSelection *sel, gpointer
|
|
|
4b6aa8 |
gtk_text_view_scroll_to_iter(new_word->tev, &(new_word->start), 0.0, false, 0, 0);
|
|
|
4b6aa8 |
}
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
-static gboolean highlight_search(gpointer user_data)
|
|
|
4b6aa8 |
+static void highlight_search(GtkEntry *entry)
|
|
|
4b6aa8 |
{
|
|
|
4b6aa8 |
- GtkEntry *entry = GTK_ENTRY(user_data);
|
|
|
4b6aa8 |
-
|
|
|
4b6aa8 |
g_search_text = gtk_entry_get_text(entry);
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
log_notice("searching: '%s'", g_search_text);
|
|
|
4b6aa8 |
GList *words = g_list_append(NULL, (gpointer)g_search_text);
|
|
|
4b6aa8 |
highligh_words_in_tabs(words, NULL);
|
|
|
4b6aa8 |
g_list_free(words);
|
|
|
4b6aa8 |
+}
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
+static gboolean highlight_search_on_timeout(gpointer user_data)
|
|
|
4b6aa8 |
+{
|
|
|
4b6aa8 |
+ g_timeout = 0;
|
|
|
4b6aa8 |
+ highlight_search(GTK_ENTRY(user_data));
|
|
|
4b6aa8 |
/* returning false will make glib to remove this event */
|
|
|
4b6aa8 |
return false;
|
|
|
4b6aa8 |
}
|
|
|
4b6aa8 |
@@ -2935,7 +2938,7 @@ static void search_timeout(GtkEntry *entry)
|
|
|
4b6aa8 |
*/
|
|
|
4b6aa8 |
if (g_timeout != 0)
|
|
|
4b6aa8 |
g_source_remove(g_timeout);
|
|
|
4b6aa8 |
- g_timeout = g_timeout_add(500, &highlight_search, (gpointer)entry);
|
|
|
4b6aa8 |
+ g_timeout = g_timeout_add(500, &highlight_search_on_timeout, (gpointer)entry);
|
|
|
4b6aa8 |
}
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
static void on_forbidden_words_toggled(GtkToggleButton *btn, gpointer user_data)
|
|
|
4b6aa8 |
--
|
|
|
4b6aa8 |
1.8.3.1
|
|
|
4b6aa8 |
|