From 5ddcfa7be6fb012b0e2d3c3850e079ea4bcdef6f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 26 Oct 2011 19:39:04 +0200 Subject: [PATCH] Clear Private Data: Merge Closed Tabs with History It would be misleading to delete one but not the other and assume the pages are actually gone. --- midori/main.c | 2 +- midori/midori-browser.c | 15 +++------------ midori/midori-websettings.h | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/midori/main.c b/midori/main.c index 79e93d2e..0333742a 100644 --- a/midori/main.c +++ b/midori/main.c @@ -2643,7 +2643,7 @@ main (int argc, midori_remove_config_file (clear_prefs, MIDORI_CLEAR_SESSION, "session.xbel"); midori_remove_config_file (clear_prefs, MIDORI_CLEAR_HISTORY, "history.db"); - midori_remove_config_file (clear_prefs, MIDORI_CLEAR_TRASH, "tabtrash.xbel"); + midori_remove_config_file (clear_prefs, MIDORI_CLEAR_HISTORY, "tabtrash.xbel"); for (; data_items != NULL; data_items = g_list_next (data_items)) { diff --git a/midori/midori-browser.c b/midori/midori-browser.c index f92bd562..1bf8bfc5 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -4512,14 +4512,10 @@ midori_browser_clear_private_data_response_cb (GtkWidget* dialog, if (gtk_toggle_button_get_active (button)) { katze_array_clear (browser->history); - clear_prefs |= MIDORI_CLEAR_HISTORY; - } - button = g_object_get_data (G_OBJECT (dialog), "trash"); - if (gtk_toggle_button_get_active (button) && browser->trash) - { katze_array_clear (browser->trash); _midori_browser_update_actions (browser); - clear_prefs |= MIDORI_CLEAR_TRASH; + clear_prefs |= MIDORI_CLEAR_HISTORY; + clear_prefs |= MIDORI_CLEAR_TRASH; /* For backward-compatibility */ } if (clear_prefs != saved_prefs) { @@ -4618,17 +4614,12 @@ _action_clear_private_data_activate (GtkAction* action, gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); g_object_set_data (G_OBJECT (dialog), "session", button); gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0); - /* i18n: Browsing history, visited web pages */ + /* i18n: Browsing history, visited web pages, closed tabs */ button = gtk_check_button_new_with_mnemonic (_("_History")); if ((clear_prefs & MIDORI_CLEAR_HISTORY) == MIDORI_CLEAR_HISTORY) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); g_object_set_data (G_OBJECT (dialog), "history", button); gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0); - button = gtk_check_button_new_with_mnemonic (_("_Closed Tabs")); - if ((clear_prefs & MIDORI_CLEAR_TRASH) == MIDORI_CLEAR_TRASH) - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); - g_object_set_data (G_OBJECT (dialog), "trash", button); - gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0); data_items = sokoke_register_privacy_item (NULL, NULL, NULL); for (; data_items != NULL; data_items = g_list_next (data_items)) diff --git a/midori/midori-websettings.h b/midori/midori-websettings.h index 0b16ed2c..8e7e3605 100644 --- a/midori/midori-websettings.h +++ b/midori/midori-websettings.h @@ -41,7 +41,7 @@ enum MIDORI_CLEAR_COOKIES = 2, /* deprecated */ MIDORI_CLEAR_FLASH_COOKIES = 4, /* deprecated */ MIDORI_CLEAR_WEBSITE_ICONS = 8, /* deprecated */ - MIDORI_CLEAR_TRASH = 16, + MIDORI_CLEAR_TRASH = 16, /* deprecated */ MIDORI_CLEAR_ON_QUIT = 32, MIDORI_CLEAR_WEB_CACHE = 64, /* deprecated */ MIDORI_CLEAR_SESSION = 128, -- 2.39.5