Add 'Web Cache' to Delete private data dialogue
This commit is contained in:
parent
2ea4ae7079
commit
a35b548589
3 changed files with 22 additions and 0 deletions
|
@ -2134,6 +2134,13 @@ main (int argc,
|
||||||
g_free (cache);
|
g_free (cache);
|
||||||
}
|
}
|
||||||
midori_remove_config_file (clear_prefs, MIDORI_CLEAR_TRASH, "tabtrash.xbel");
|
midori_remove_config_file (clear_prefs, MIDORI_CLEAR_TRASH, "tabtrash.xbel");
|
||||||
|
if ((clear_prefs & MIDORI_CLEAR_WEB_CACHE) == MIDORI_CLEAR_WEB_CACHE)
|
||||||
|
{
|
||||||
|
gchar* cache = g_build_filename (g_get_user_cache_dir (),
|
||||||
|
PACKAGE_NAME, "web", NULL);
|
||||||
|
sokoke_remove_path (cache, TRUE);
|
||||||
|
g_free (cache);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (katze_object_get_boolean (settings, "load-on-startup")
|
if (katze_object_get_boolean (settings, "load-on-startup")
|
||||||
|
|
|
@ -4351,6 +4351,15 @@ midori_browser_clear_private_data_response_cb (GtkWidget* dialog,
|
||||||
}
|
}
|
||||||
clear_prefs |= MIDORI_CLEAR_TRASH;
|
clear_prefs |= MIDORI_CLEAR_TRASH;
|
||||||
}
|
}
|
||||||
|
button = g_object_get_data (G_OBJECT (dialog), "web-cache");
|
||||||
|
if (gtk_toggle_button_get_active (button))
|
||||||
|
{
|
||||||
|
gchar* cache = g_build_filename (g_get_user_cache_dir (),
|
||||||
|
PACKAGE_NAME, "web", NULL);
|
||||||
|
sokoke_remove_path (cache, TRUE);
|
||||||
|
g_free (cache);
|
||||||
|
clear_prefs |= MIDORI_CLEAR_WEB_CACHE;
|
||||||
|
}
|
||||||
|
|
||||||
if (clear_prefs != saved_prefs)
|
if (clear_prefs != saved_prefs)
|
||||||
g_object_set (browser->settings, "clear-private-data", clear_prefs, NULL);
|
g_object_set (browser->settings, "clear-private-data", clear_prefs, NULL);
|
||||||
|
@ -4445,6 +4454,11 @@ _action_clear_private_data_activate (GtkAction* action,
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||||
g_object_set_data (G_OBJECT (dialog), "trash", button);
|
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 (vbox), button, TRUE, TRUE, 0);
|
||||||
|
button = gtk_check_button_new_with_mnemonic (_("Web Cache"));
|
||||||
|
if ((clear_prefs & MIDORI_CLEAR_WEB_CACHE) == MIDORI_CLEAR_WEB_CACHE)
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||||
|
g_object_set_data (G_OBJECT (dialog), "web-cache", button);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), vbox);
|
gtk_container_add (GTK_CONTAINER (alignment), vbox);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), alignment, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), alignment, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0);
|
||||||
|
|
|
@ -43,6 +43,7 @@ enum
|
||||||
MIDORI_CLEAR_WEBSITE_ICONS = 8,
|
MIDORI_CLEAR_WEBSITE_ICONS = 8,
|
||||||
MIDORI_CLEAR_TRASH = 16,
|
MIDORI_CLEAR_TRASH = 16,
|
||||||
MIDORI_CLEAR_ON_QUIT = 32,
|
MIDORI_CLEAR_ON_QUIT = 32,
|
||||||
|
MIDORI_CLEAR_WEB_CACHE = 64,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
Loading…
Reference in a new issue