]> spindle.queued.net Git - midori/commitdiff
Reduce the maximum days history is saved for to a number
authorChristian Dywan <christian@twotoasts.de>
Sat, 14 Nov 2009 17:29:29 +0000 (18:29 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 14 Nov 2009 21:50:21 +0000 (22:50 +0100)
No need for a boolean flag, 0 days are just as good.

midori/midori-browser.c
midori/midori-preferences.c
midori/midori-websettings.c

index d9aecee5a38252da65d90adb454c3ecf0b869616..51f6fea0945ded40c3109fc1043560db132c3861 100644 (file)
@@ -92,7 +92,7 @@ struct _MidoriBrowser
     gboolean show_statusbar;
     gboolean speed_dial_in_new_tabs;
     gboolean progress_in_location;
-    gboolean remember_last_visited_pages;
+    guint maximum_history_age;
     gchar* location_entry_search;
     gchar* news_aggregator;
 };
@@ -475,7 +475,7 @@ midori_view_notify_icon_cb (MidoriView*    view,
 
     uri = midori_view_get_display_uri (MIDORI_VIEW (view));
     action = _action_by_name (browser, "Location");
-    if (browser->remember_last_visited_pages)
+    if (browser->maximum_history_age)
         midori_location_action_set_icon_for_uri (
         MIDORI_LOCATION_ACTION (action), midori_view_get_icon (view), uri);
 }
@@ -494,7 +494,7 @@ midori_view_notify_load_status_cb (GtkWidget*      widget,
 
     if (midori_view_get_load_status (view) == MIDORI_LOAD_COMMITTED)
     {
-        if (browser->remember_last_visited_pages)
+        if (browser->maximum_history_age)
             midori_location_action_add_uri (MIDORI_LOCATION_ACTION (action), uri);
     }
 
@@ -566,7 +566,7 @@ midori_view_notify_title_cb (GtkWidget*     widget,
     uri = midori_view_get_display_uri (view);
     title = midori_view_get_display_title (view);
     action = _action_by_name (browser, "Location");
-    if (browser->remember_last_visited_pages)
+    if (browser->maximum_history_age)
         midori_location_action_set_title_for_uri (
         MIDORI_LOCATION_ACTION (action), title, uri);
     if (midori_view_get_load_status (view) == MIDORI_LOAD_COMMITTED)
@@ -574,7 +574,7 @@ midori_view_notify_title_cb (GtkWidget*     widget,
         KatzeItem* item;
         KatzeItem* proxy;
 
-        if (browser->history && browser->remember_last_visited_pages)
+        if (browser->history && browser->maximum_history_age)
         {
             item = g_object_get_data (G_OBJECT (view), "history-item-added");
             proxy = midori_view_get_proxy_item (view);
@@ -5942,7 +5942,7 @@ _midori_browser_update_settings (MidoriBrowser* browser)
                   "location-entry-search", &browser->location_entry_search,
                   "close-buttons-on-tabs", &close_buttons_on_tabs,
                   "progress-in-location", &browser->progress_in_location,
-                  "remember-last-visited-pages", &browser->remember_last_visited_pages,
+                  "maximum-history-age", &browser->maximum_history_age,
                   "news-aggregator", &browser->news_aggregator,
                   NULL);
 
@@ -6089,8 +6089,8 @@ midori_browser_settings_notify (MidoriWebSettings* web_settings,
     {
         katze_assign (browser->location_entry_search, g_value_dup_string (&value));
     }
-    else if (name == g_intern_string ("remember-last-visited-pages"))
-        browser->remember_last_visited_pages = g_value_get_boolean (&value);
+    else if (name == g_intern_string ("maximum-history-age"))
+        browser->maximum_history_age = g_value_get_boolean (&value);
     else if (name == g_intern_string ("news-aggregator"))
     {
         katze_assign (browser->news_aggregator, g_value_dup_string (&value));
index 224cb5dfd80e2236c618d7fc4c83ab17990cda6b..0596b0fa135176e1dd9d375e477ccabdb56f9216 100644 (file)
@@ -542,7 +542,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
     label = gtk_label_new (_("days"));
     SPANNED_ADD (label);
     FRAME_NEW (_("History"));
-    button = katze_property_proxy (settings, "remember-last-visited-pages", NULL);
+    button = katze_property_label (settings, "maximum-history-age");
     INDENTED_ADD (button);
     button = katze_property_proxy (settings, "maximum-history-age", NULL);
     SPANNED_ADD (button);
index d76dd4e1c5c6bbf283c369f683cac3854c683697..2445eae1ba93ba3e0285db45473547be8d425207 100644 (file)
@@ -919,6 +919,13 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
 
 
 
+    /**
+    * MidoriWebSettings:remember-last-visited-pages:
+    *
+    * Whether the last visited pages are saved.
+    *
+    * Deprecated: 0.2.2
+    */
     g_object_class_install_property (gobject_class,
                                      PROP_REMEMBER_LAST_VISITED_PAGES,
                                      g_param_spec_boolean (