Only save thumbnails if Customized homepage is enabled

This commit is contained in:
Christian Dywan 2009-05-08 17:46:50 +02:00
parent 5e1b3a0bad
commit 446fe346cb

View file

@ -85,6 +85,7 @@ struct _MidoriBrowser
gboolean show_navigationbar; gboolean show_navigationbar;
gboolean show_statusbar; gboolean show_statusbar;
gboolean customized_homepage_in_new_tabs;
gboolean progress_in_location; gboolean progress_in_location;
gboolean remember_last_visited_pages; gboolean remember_last_visited_pages;
gchar* location_entry_search; gchar* location_entry_search;
@ -402,8 +403,6 @@ midori_browser_update_thumbnail (GtkWidget* view,
GtkWidget* child; GtkWidget* child;
#if GTK_CHECK_VERSION (2, 12, 0) #if GTK_CHECK_VERSION (2, 12, 0)
/* FIXME: A preference should toggle thumbnails */
if (midori_view_get_load_status (MIDORI_VIEW (view)) != MIDORI_LOAD_FINISHED) if (midori_view_get_load_status (MIDORI_VIEW (view)) != MIDORI_LOAD_FINISHED)
return; return;
@ -479,6 +478,7 @@ midori_view_notify_load_status_cb (GtkWidget* view,
MIDORI_LOCATION_ACTION (action), NULL); MIDORI_LOCATION_ACTION (action), NULL);
g_object_notify (G_OBJECT (browser), "uri"); g_object_notify (G_OBJECT (browser), "uri");
} }
if (browser->customized_homepage_in_new_tabs)
midori_browser_update_thumbnail (view, uri); midori_browser_update_thumbnail (view, uri);
_midori_browser_update_interface (browser); _midori_browser_update_interface (browser);
@ -3504,6 +3504,7 @@ gtk_notebook_switch_page_cb (GtkWidget* notebook,
_midori_browser_update_interface (browser); _midori_browser_update_interface (browser);
_midori_browser_update_progress (browser, MIDORI_VIEW (view)); _midori_browser_update_progress (browser, MIDORI_VIEW (view));
if (browser->customized_homepage_in_new_tabs)
midori_browser_update_thumbnail (view, uri); midori_browser_update_thumbnail (view, uri);
} }
@ -4831,6 +4832,7 @@ _midori_browser_update_settings (MidoriBrowser* browser)
"show-panel", &show_panel, "show-panel", &show_panel,
"show-transferbar", &show_transferbar, "show-transferbar", &show_transferbar,
"show-statusbar", &browser->show_statusbar, "show-statusbar", &browser->show_statusbar,
"customized-homepage-in-new-tabs", &browser->customized_homepage_in_new_tabs,
"toolbar-style", &toolbar_style, "toolbar-style", &toolbar_style,
"toolbar-items", &toolbar_items, "toolbar-items", &toolbar_items,
"last-web-search", &last_web_search, "last-web-search", &last_web_search,
@ -4937,6 +4939,8 @@ midori_browser_settings_notify (MidoriWebSettings* web_settings,
browser->show_navigationbar = g_value_get_boolean (&value); browser->show_navigationbar = g_value_get_boolean (&value);
else if (name == g_intern_string ("show-statusbar")) else if (name == g_intern_string ("show-statusbar"))
browser->show_statusbar = g_value_get_boolean (&value); browser->show_statusbar = g_value_get_boolean (&value);
else if (name == g_intern_string ("customized-homepage-in-new-tabs"))
browser->customized_homepage_in_new_tabs = g_value_get_boolean (&value);
else if (name == g_intern_string ("progress-in-location")) else if (name == g_intern_string ("progress-in-location"))
browser->progress_in_location = g_value_get_boolean (&value); browser->progress_in_location = g_value_get_boolean (&value);
else if (name == g_intern_string ("search-engines-in-completion")) else if (name == g_intern_string ("search-engines-in-completion"))