From 24dc508fa7d1cff2a9887b5f5aa9c292f706ad5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Guchens?= Date: Fri, 22 May 2009 02:16:58 +0200 Subject: [PATCH] Add 'Closed tabs and windows' to Clear private data dialogue --- midori/midori-browser.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 171ceeb9..510f003b 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3486,6 +3486,15 @@ midori_browser_clear_private_data_response_cb (GtkWidget* dialog, sokoke_remove_path (cache, TRUE); g_free (cache); } + button = g_object_get_data (G_OBJECT (dialog), "trash"); + if (gtk_toggle_button_get_active (button)) + { + if (browser->trash) + { + katze_array_clear (browser->trash); + _midori_browser_update_actions (browser); + } + } } if (response_id != GTK_RESPONSE_DELETE_EVENT) gtk_widget_destroy (dialog); @@ -3548,6 +3557,9 @@ _action_clear_private_data_activate (GtkAction* action, g_object_set_data (G_OBJECT (dialog), "website-icons", button); gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); + button = gtk_check_button_new_with_mnemonic (_("_Closed Tabs and Windows")); + g_object_set_data (G_OBJECT (dialog), "trash", button); + gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 8); gtk_widget_show_all (GTK_DIALOG (dialog)->vbox);