[gnome-builder] GbSearchBox: dont indefinitely delay searches
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] GbSearchBox: dont indefinitely delay searches
- Date: Wed, 17 Dec 2014 10:49:45 +0000 (UTC)
commit db2d8c69519f0cadbd91d5a713e88bc3b04e5395
Author: Christian Hergert <christian hergert me>
Date: Tue Dec 16 22:15:21 2014 -0800
GbSearchBox: dont indefinitely delay searches
src/search/gb-search-box.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/src/search/gb-search-box.c b/src/search/gb-search-box.c
index 70d59ec..86611a5 100644
--- a/src/search/gb-search-box.c
+++ b/src/search/gb-search-box.c
@@ -146,23 +146,19 @@ static void
gb_search_box_entry_changed (GbSearchBox *box,
GtkSearchEntry *entry)
{
- const gchar *search_text;
-
g_return_if_fail (GB_IS_SEARCH_BOX (box));
g_return_if_fail (GTK_IS_SEARCH_ENTRY (entry));
- if (box->priv->delay_timeout)
+ if (!box->priv->delay_timeout)
{
- g_source_remove (box->priv->delay_timeout);
- box->priv->delay_timeout = 0;
- }
+ const gchar *search_text;
- search_text = gtk_entry_get_text (GTK_ENTRY (entry));
-
- if (search_text)
- box->priv->delay_timeout = g_timeout_add (DELAY_TIMEOUT_MSEC,
- gb_search_box_delay_cb,
- box);
+ search_text = gtk_entry_get_text (GTK_ENTRY (entry));
+ if (search_text)
+ box->priv->delay_timeout = g_timeout_add (DELAY_TIMEOUT_MSEC,
+ gb_search_box_delay_cb,
+ box);
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]