[Xfce4-commits] <midori:master> Remove 'Delete cookies when quitting' preference

Christian Dywan noreply at xfce.org
Sat Apr 30 13:16:01 CEST 2011


Updating branch refs/heads/master
         to 4435b8fcef3fd14044986d090e21073393aa2e2c (commit)
       from bbfa7f6030dcc2b6ddbed15310e08d83f4d9e869 (commit)

commit 4435b8fcef3fd14044986d090e21073393aa2e2c
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Apr 30 11:56:12 2011 +0200

    Remove 'Delete cookies when quitting' preference
    
    Clear Private Data already offers the same option.

 katze/katze-http-cookies.c  |   13 +------------
 midori/main.c               |   15 +--------------
 midori/midori-websettings.c |    7 +++++++
 3 files changed, 9 insertions(+), 26 deletions(-)

diff --git a/katze/katze-http-cookies.c b/katze/katze-http-cookies.c
index 43379dc..304bf8d 100644
--- a/katze/katze-http-cookies.c
+++ b/katze/katze-http-cookies.c
@@ -236,7 +236,6 @@ katze_http_cookies_jar_changed_cb (SoupCookieJar*    jar,
                                    KatzeHttpCookies* http_cookies)
 {
     GObject* settings;
-    guint accept_cookies;
 
     if (old_cookie)
         soup_cookie_set_max_age (old_cookie, 0);
@@ -244,17 +243,7 @@ katze_http_cookies_jar_changed_cb (SoupCookieJar*    jar,
     if (new_cookie)
     {
         settings = g_object_get_data (G_OBJECT (jar), "midori-settings");
-        accept_cookies = katze_object_get_enum (settings, "accept-cookies");
-        if (accept_cookies == 2 /* MIDORI_ACCEPT_COOKIES_NONE */)
-        {
-            soup_cookie_set_max_age (new_cookie, 0);
-        }
-        else if (accept_cookies == 1 /* MIDORI_ACCEPT_COOKIES_SESSION */
-            && new_cookie->expires)
-        {
-            soup_cookie_set_max_age (new_cookie, -1);
-        }
-        else if (new_cookie->expires)
+        if (new_cookie->expires)
         {
             gint age = katze_object_get_int (settings, "maximum-cookie-age");
             if (age > 0)
diff --git a/midori/main.c b/midori/main.c
index 0eba309..c486587 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -713,15 +713,6 @@ midori_browser_show_preferences_cb (MidoriBrowser*    browser,
 }
 
 static void
-midori_preferences_delete_cookies_toggled_cb (GtkToggleButton*   button,
-                                              MidoriWebSettings* settings)
-{
-    gboolean toggled = gtk_toggle_button_get_active (button);
-    g_object_set (settings, "accept-cookies",
-        toggled ? MIDORI_ACCEPT_COOKIES_SESSION : MIDORI_ACCEPT_COOKIES_ALL, NULL);
-}
-
-static void
 midori_preferences_delete_cookies_changed_cb (GtkComboBox*       combo,
                                               MidoriWebSettings* settings)
 {
@@ -754,12 +745,8 @@ midori_browser_privacy_preferences_cb (MidoriBrowser*    browser,
 
     katze_preferences_add_category (preferences, _("Privacy"), GTK_STOCK_INDEX);
     katze_preferences_add_group (preferences, _("Web Cookies"));
-    button = gtk_check_button_new_with_mnemonic (_("Delete cookies when quitting Midori"));
+    button = katze_property_label (settings, "maximum-cookie-age");
     katze_preferences_add_widget (preferences, button, "indented");
-    if (katze_object_get_enum (settings, "accept-cookies") == MIDORI_ACCEPT_COOKIES_SESSION)
-        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
-    g_signal_connect (button, "toggled",
-        G_CALLBACK (midori_preferences_delete_cookies_toggled_cb), settings);
     button = gtk_combo_box_new_text ();
     gtk_combo_box_append_text (GTK_COMBO_BOX (button), _("Delete old cookies after 1 hour"));
     gtk_combo_box_append_text (GTK_COMBO_BOX (button), _("Delete old cookies after 1 day"));
diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index 15b3f4d..815ce34 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -958,6 +958,13 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
                                      TRUE,
                                      flags));
 
+    /**
+     * MidoriWebSettings:accept-cookies:
+     *
+     * What type of cookies to accept.
+     *
+     * Deprecated: 0.3.4
+     **/
     g_object_class_install_property (gobject_class,
                                      PROP_ACCEPT_COOKIES,
                                      g_param_spec_enum (



More information about the Xfce4-commits mailing list