Dont store about:* pages in history, Reset history step counter

This commit is contained in:
Alexander Butenko 2010-07-23 17:11:38 -04:00 committed by Christian Dywan
parent fd48f850a3
commit e2ac49a76d
2 changed files with 7 additions and 4 deletions

View file

@ -625,16 +625,18 @@ midori_view_notify_title_cb (GtkWidget* widget,
proxy = midori_view_get_proxy_item (view);
proxy_uri = katze_item_get_uri (proxy);
if (proxy_uri && *proxy_uri && proxy_uri[1] &&
(katze_item_get_meta_integer (proxy, "process") == -1))
!g_str_has_prefix (proxy_uri, "about:") &&
(katze_item_get_meta_integer (proxy, "history-step") == -1))
{
midori_browser_new_history_item (browser, proxy);
katze_item_set_meta_integer (proxy, "process", 1);
katze_item_set_meta_integer (proxy, "history-step", 1);
}
else if (katze_item_get_name (proxy) &&
(katze_item_get_meta_integer (proxy, "process") == 1))
!g_str_has_prefix (proxy_uri, "about:") &&
(katze_item_get_meta_integer (proxy, "history-step") == 1))
{
midori_browser_update_history_title (browser, proxy);
katze_item_set_meta_integer (proxy, "process", 2);
katze_item_set_meta_integer (proxy, "history-step", 2);
}
}
}

View file

@ -1011,6 +1011,7 @@ webkit_web_view_load_committed_cb (WebKitWebView* web_view,
}
katze_item_set_added (view->item, time (NULL));
katze_item_set_meta_integer (view->item, "history-step", -1);
g_object_notify (G_OBJECT (view), "uri");
g_object_set (view, "title", NULL, NULL);