Updating branch refs/heads/master
         to 60f93f157a6c73ae1733627852b425fa968352ce (commit)
       from f145efaabce72f736e37be980b59a01674e005b9 (commit)

commit 60f93f157a6c73ae1733627852b425fa968352ce
Author: Christian Dywan <[email protected]>
Date:   Wed Aug 8 23:47:51 2012 +0200

    Check sokoke_has_default instead of placeholder text
    
    It is set if there's a placeholder (and GTK+ 3 returns NULL text).

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

diff --git a/extensions/cookie-manager/cookie-manager-page.c 
b/extensions/cookie-manager/cookie-manager-page.c
index 2fe35c4..186e310 100644
--- a/extensions/cookie-manager/cookie-manager-page.c
+++ b/extensions/cookie-manager/cookie-manager-page.c
@@ -809,7 +809,7 @@ static void cm_filter_entry_changed_cb(GtkEditable 
*editable, CookieManagerPage
        if (priv->ignore_changed_filter)
                return;
 
-       if (gtk_entry_get_placeholder_text(GTK_ENTRY(editable)) != NULL)
+       if (!g_object_get_data (G_OBJECT (editable), "sokoke_has_default"))
                text = gtk_entry_get_text(GTK_ENTRY(editable));
        else
                text = NULL;
@@ -817,10 +817,10 @@ static void cm_filter_entry_changed_cb(GtkEditable 
*editable, CookieManagerPage
 
        cookie_manager_update_filter(priv->parent, text);
 
-       if (*text != '\0')
-               gtk_tree_view_expand_all(GTK_TREE_VIEW(priv->treeview));
-       else
+       if (text && *text)
                gtk_tree_view_collapse_all(GTK_TREE_VIEW(priv->treeview));
+       else
+               gtk_tree_view_expand_all(GTK_TREE_VIEW(priv->treeview));
 }
 
 static void cm_tree_selection_changed_cb(GtkTreeSelection *selection, 
CookieManagerPage *cmp)
diff --git a/panels/midori-bookmarks.c b/panels/midori-bookmarks.c
index 0f6b5d7..39b4950 100644
--- a/panels/midori-bookmarks.c
+++ b/panels/midori-bookmarks.c
@@ -1002,7 +1002,7 @@ midori_bookmarks_filter_entry_changed_cb (GtkEntry*       
 entry,
     if (bookmarks->filter_timeout)
         g_source_remove (bookmarks->filter_timeout);
 
-    if (gtk_entry_get_placeholder_text (entry) != NULL)
+    if (!g_object_get_data (G_OBJECT (entry), "sokoke_has_default"))
         katze_assign (bookmarks->filter, g_strdup (gtk_entry_get_text 
(entry)));
     else
         katze_assign (bookmarks->filter, NULL);
diff --git a/panels/midori-history.c b/panels/midori-history.c
index b8ac99e..c1bb181 100644
--- a/panels/midori-history.c
+++ b/panels/midori-history.c
@@ -968,7 +968,7 @@ midori_history_filter_entry_changed_cb (GtkEntry*      
entry,
     history->filter_timeout = g_timeout_add (COMPLETION_DELAY,
         midori_history_filter_timeout_cb, history);
 
-    if (gtk_entry_get_placeholder_text (entry) != NULL)
+    if (!g_object_get_data (G_OBJECT (entry), "sokoke_has_default"))
         katze_assign (history->filter, g_strdup (gtk_entry_get_text (entry)));
     else
         katze_assign (history->filter, NULL);
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to