Don't add session tabs to the history on startup
Otherwise the startup as a whole causes a lot of disk activity that isn't really needed.
This commit is contained in:
parent
43b2d39c1e
commit
b47184778a
2 changed files with 14 additions and 2 deletions
|
@ -1288,6 +1288,7 @@ midori_load_session (gpointer data)
|
||||||
KATZE_ARRAY_FOREACH_ITEM (item, _session)
|
KATZE_ARRAY_FOREACH_ITEM (item, _session)
|
||||||
{
|
{
|
||||||
g_object_set_data (G_OBJECT (item), "midori-view-append", (void*)1);
|
g_object_set_data (G_OBJECT (item), "midori-view-append", (void*)1);
|
||||||
|
katze_item_set_meta_integer (item, "dont-write-history", 1);
|
||||||
midori_browser_add_item (browser, item);
|
midori_browser_add_item (browser, item);
|
||||||
}
|
}
|
||||||
current = katze_item_get_meta_integer (KATZE_ITEM (_session), "current");
|
current = katze_item_get_meta_integer (KATZE_ITEM (_session), "current");
|
||||||
|
|
|
@ -330,6 +330,8 @@ _midori_browser_update_interface (MidoriBrowser* browser)
|
||||||
"sensitive", can_reload, NULL);
|
"sensitive", can_reload, NULL);
|
||||||
if (!browser->show_navigationbar)
|
if (!browser->show_navigationbar)
|
||||||
gtk_widget_hide (browser->navigationbar);
|
gtk_widget_hide (browser->navigationbar);
|
||||||
|
|
||||||
|
katze_item_set_meta_integer (midori_view_get_proxy_item (view), "dont-write-history", 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -591,10 +593,13 @@ midori_view_notify_title_cb (GtkWidget* widget,
|
||||||
if (proxy_uri && *proxy_uri && proxy_uri[1] &&
|
if (proxy_uri && *proxy_uri && proxy_uri[1] &&
|
||||||
!g_str_has_prefix (proxy_uri, "about:") &&
|
!g_str_has_prefix (proxy_uri, "about:") &&
|
||||||
(katze_item_get_meta_integer (proxy, "history-step") == -1))
|
(katze_item_get_meta_integer (proxy, "history-step") == -1))
|
||||||
|
{
|
||||||
|
if (!katze_item_get_meta_boolean (proxy, "dont-write-history"))
|
||||||
{
|
{
|
||||||
midori_browser_new_history_item (browser, proxy);
|
midori_browser_new_history_item (browser, proxy);
|
||||||
katze_item_set_meta_integer (proxy, "history-step", 1);
|
katze_item_set_meta_integer (proxy, "history-step", 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (katze_item_get_name (proxy) &&
|
else if (katze_item_get_name (proxy) &&
|
||||||
!g_str_has_prefix (proxy_uri, "about:") &&
|
!g_str_has_prefix (proxy_uri, "about:") &&
|
||||||
(katze_item_get_meta_integer (proxy, "history-step") == 1))
|
(katze_item_get_meta_integer (proxy, "history-step") == 1))
|
||||||
|
@ -6716,6 +6721,12 @@ midori_browser_add_item (MidoriBrowser* browser,
|
||||||
title = katze_item_get_name (item);
|
title = katze_item_get_name (item);
|
||||||
view = midori_view_new_with_title (title, browser->settings,
|
view = midori_view_new_with_title (title, browser->settings,
|
||||||
g_object_get_data (G_OBJECT (item), "midori-view-append") ? TRUE : FALSE);
|
g_object_get_data (G_OBJECT (item), "midori-view-append") ? TRUE : FALSE);
|
||||||
|
|
||||||
|
proxy_item = midori_view_get_proxy_item (MIDORI_VIEW (view));
|
||||||
|
|
||||||
|
if (katze_item_get_meta_boolean (item, "dont-write-history"))
|
||||||
|
katze_item_set_meta_integer (proxy_item, "dont-write-history", 1);
|
||||||
|
|
||||||
page = midori_browser_add_tab (browser, view);
|
page = midori_browser_add_tab (browser, view);
|
||||||
|
|
||||||
/* Blank pages should not be delayed */
|
/* Blank pages should not be delayed */
|
||||||
|
|
Loading…
Reference in a new issue