[Xfce4-commits] <midori:master> Don't search for place holder text on cookie list rebuild

Christian Dywan noreply at xfce.org
Fri Feb 8 19:36:01 CET 2013


Updating branch refs/heads/master
         to 063997dfda6483e932582fa06fe7ab6686839c49 (commit)
       from 124c418b08c4412a8fc10274f8f5e59aff0ee2cc (commit)

commit 063997dfda6483e932582fa06fe7ab6686839c49
Author: Enrico Tröger <enrico.troeger at uvena.de>
Date:   Wed Feb 6 23:24:06 2013 +0100

    Don't search for place holder text on cookie list rebuild
    
    Also properly handle the default placeholder text
    on the 'delete all' confirmation dialog.

 extensions/cookie-manager/cookie-manager-page.c |   24 ++++++++++++++--------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/extensions/cookie-manager/cookie-manager-page.c b/extensions/cookie-manager/cookie-manager-page.c
index a12b884..03e4ff5 100644
--- a/extensions/cookie-manager/cookie-manager-page.c
+++ b/extensions/cookie-manager/cookie-manager-page.c
@@ -166,12 +166,15 @@ static void cookie_manager_page_cookies_changed_cb(CookieManager *cm, CookieMana
 	gtk_tree_view_set_model(GTK_TREE_VIEW(priv->treeview), GTK_TREE_MODEL(priv->filter));
 	g_object_unref(priv->filter);
 
-	/* if a filter is set, apply it again */
-	filter_text = gtk_entry_get_text(GTK_ENTRY(priv->filter_entry));
-	if (*filter_text != '\0')
+	/* if a filter is set, apply it again but ignore the place holder text */
+	if (!g_object_get_data (G_OBJECT (priv->filter_entry), "sokoke_has_default"))
 	{
-		cm_filter_tree(cmp, filter_text);
-		gtk_tree_view_expand_all(GTK_TREE_VIEW(priv->treeview));
+		filter_text = gtk_entry_get_text(GTK_ENTRY(priv->filter_entry));
+		if (*filter_text != '\0')
+		{
+			cm_filter_tree(cmp, filter_text);
+			gtk_tree_view_expand_all(GTK_TREE_VIEW(priv->treeview));
+		}
 	}
 }
 
@@ -576,11 +579,14 @@ static void cm_button_delete_all_clicked_cb(GtkToolButton *button, CookieManager
 	if (toplevel != NULL)
 		gtk_window_set_icon_name(GTK_WINDOW(dialog), gtk_window_get_icon_name(GTK_WINDOW(toplevel)));
 
-	filter_text = gtk_entry_get_text(GTK_ENTRY(priv->filter_entry));
-	if (*filter_text != '\0')
+	if (!g_object_get_data (G_OBJECT (priv->filter_entry), "sokoke_has_default"))
 	{
-		gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
-			_("Only cookies which match the filter will be deleted."));
+		filter_text = gtk_entry_get_text(GTK_ENTRY(priv->filter_entry));
+		if (*filter_text != '\0')
+		{
+			gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
+				_("Only cookies which match the filter will be deleted."));
+		}
 	}
 
 	if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_YES)


More information about the Xfce4-commits mailing list