]> spindle.queued.net Git - midori/commitdiff
Remove 'Delete cookies when quitting' preference
authorChristian Dywan <christian@twotoasts.de>
Sat, 30 Apr 2011 09:56:12 +0000 (11:56 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 30 Apr 2011 09:56:12 +0000 (11:56 +0200)
Clear Private Data already offers the same option.

katze/katze-http-cookies.c
midori/main.c
midori/midori-websettings.c

index 43379dcac385ee37cfe62a9729c7efcd9c290e72..304bf8da07a5bafa5202d3e608444b0af4f3a797 100644 (file)
@@ -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)
index 0eba309d34f7ed333e7804c9b1703dab80a28517..c486587498496879b35a6348835509a72de7ba2d 100644 (file)
@@ -712,15 +712,6 @@ midori_browser_show_preferences_cb (MidoriBrowser*    browser,
     gtk_box_pack_start (GTK_BOX (page), scrolled, TRUE, TRUE, 4);
 }
 
-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"));
index 15b3f4de2364dbf83f60c1ff8f425253d5b45a78..815ce34d69c62c977206ce0e643cf3a1d621233d 100644 (file)
@@ -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 (