[Xfce4-commits] <midori:master> Don't search for place holder text in panels

Christian Dywan noreply at xfce.org
Fri Aug 3 21:08:02 CEST 2012


Updating branch refs/heads/master
         to 3ecdcf0826620b0e31e921f28ab3adbafd217346 (commit)
       from bf026bd905cf32a5aba3263706f33cf1927647df (commit)

commit 3ecdcf0826620b0e31e921f28ab3adbafd217346
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Aug 3 21:05:54 2012 +0200

    Don't search for place holder text in panels

 extensions/cookie-manager/cookie-manager-page.c |    5 ++++-
 panels/midori-bookmarks.c                       |    7 ++++++-
 panels/midori-history.c                         |    6 +++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/extensions/cookie-manager/cookie-manager-page.c b/extensions/cookie-manager/cookie-manager-page.c
index 6b6ac63..fb450b8 100644
--- a/extensions/cookie-manager/cookie-manager-page.c
+++ b/extensions/cookie-manager/cookie-manager-page.c
@@ -809,7 +809,10 @@ static void cm_filter_entry_changed_cb(GtkEditable *editable, CookieManagerPage
 	if (priv->ignore_changed_filter)
 		return;
 
-	text = gtk_entry_get_text(GTK_ENTRY(editable));
+	if (gtk_entry_get_placeholder_text(GTK_ENTRY(editable)) != NULL)
+		text = gtk_entry_get_text(GTK_ENTRY(editable));
+	else
+		text = NULL;
 	cm_filter_tree(cmp, text);
 
 	cookie_manager_update_filter(priv->parent, text);
diff --git a/panels/midori-bookmarks.c b/panels/midori-bookmarks.c
index 01da746..8ef87c3 100644
--- a/panels/midori-bookmarks.c
+++ b/panels/midori-bookmarks.c
@@ -998,7 +998,12 @@ midori_bookmarks_filter_entry_changed_cb (GtkEntry*        entry,
 {
     if (bookmarks->filter_timeout)
         g_source_remove (bookmarks->filter_timeout);
-    katze_assign (bookmarks->filter, g_strdup (gtk_entry_get_text (entry)));
+
+    if (gtk_entry_get_placeholder_text (entry) != NULL)
+        katze_assign (bookmarks->filter, g_strdup (gtk_entry_get_text (entry)));
+    else
+        katze_assign (bookmarks->filter, NULL);
+
     bookmarks->filter_timeout = g_timeout_add (COMPLETION_DELAY,
         midori_bookmarks_filter_timeout_cb, bookmarks);
 }
diff --git a/panels/midori-history.c b/panels/midori-history.c
index 50d09a1..b5d6af3 100644
--- a/panels/midori-history.c
+++ b/panels/midori-history.c
@@ -964,7 +964,11 @@ midori_history_filter_entry_changed_cb (GtkEntry*      entry,
         g_source_remove (history->filter_timeout);
     history->filter_timeout = g_timeout_add (COMPLETION_DELAY,
         midori_history_filter_timeout_cb, history);
-    katze_assign (history->filter, g_strdup (gtk_entry_get_text (entry)));
+
+    if (gtk_entry_get_placeholder_text (entry) != NULL)
+        katze_assign (history->filter, g_strdup (gtk_entry_get_text (entry)));
+    else
+        katze_assign (history->filter, NULL);
 }
 
 static void


More information about the Xfce4-commits mailing list