From 7f85c28b928772688fcd1c8afb88a460dc7334ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enrico=20Tr=C3=B6ger?= Date: Tue, 7 Apr 2009 22:16:15 +0200 Subject: [PATCH] Make it clear that Delete All only deletes visible cookies Delete All deletes either all cookies or only the visible cookies included in the filter if a filter is set. --- extensions/cookie-manager.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/extensions/cookie-manager.c b/extensions/cookie-manager.c index 2f853bd2..e506eed3 100644 --- a/extensions/cookie-manager.c +++ b/extensions/cookie-manager.c @@ -466,6 +466,7 @@ static void cm_button_delete_all_clicked_cb(GtkToolButton *button, CMData *cmdat { GtkWidget *dialog; GtkWidget *toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button)); + const gchar *filter_text; dialog = gtk_message_dialog_new(GTK_WINDOW(toplevel), GTK_DIALOG_DESTROY_WITH_PARENT, @@ -477,6 +478,13 @@ static void cm_button_delete_all_clicked_cb(GtkToolButton *button, CMData *cmdat /* steal Midori's icon :) */ gtk_window_set_icon_name(GTK_WINDOW(dialog), gtk_window_get_icon_name(GTK_WINDOW(toplevel))); + filter_text = gtk_entry_get_text(GTK_ENTRY(cmdata->filter_entry)); + if (*filter_text != '\0') + { + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), + _("Only the visible cookies are deleted which match the entered filter string.")); + } + if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_YES) cm_delete_all_cookies_real(cmdata); @@ -790,6 +798,9 @@ static void cm_app_add_browser_cb(MidoriApp *app, MidoriBrowser *browser, Midori toolitem = gtk_tool_button_new_from_stock(GTK_STOCK_DELETE); gtk_tool_button_set_label(GTK_TOOL_BUTTON(toolitem), _("Delete All")); + gtk_tool_item_set_tooltip_text(toolitem, + _("Deletes all shown cookies. " + "If a filter is set, only those cookies are deleted which match the filter.")); gtk_tool_item_set_is_important(toolitem, TRUE); g_signal_connect(toolitem, "clicked", G_CALLBACK(cm_button_delete_all_clicked_cb), cmdata); gtk_widget_show(GTK_WIDGET(toolitem)); -- 2.39.5