From dcf1bb5356d90784ae872ad7b45ca5f622d068d8 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 6 Jun 2010 23:46:10 +0200 Subject: [PATCH] Always add blank pages without delay --- midori/midori-browser.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 6acba91e..a3fe1d90 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -7488,6 +7488,7 @@ gint midori_browser_add_item (MidoriBrowser* browser, KatzeItem* item) { + const gchar* uri; const gchar* title; GtkWidget* view; gint page; @@ -7497,20 +7498,23 @@ midori_browser_add_item (MidoriBrowser* browser, g_return_val_if_fail (MIDORI_IS_BROWSER (browser), -1); g_return_val_if_fail (KATZE_IS_ITEM (item), -1); + uri = katze_item_get_uri (item); title = katze_item_get_name (item); view = g_object_new (MIDORI_TYPE_VIEW, "title", title, "settings", browser->settings, NULL); - if (katze_item_get_meta_integer (item, "delay") > 0) + /* Blank pages should not be delayed */ + if (katze_item_get_meta_integer (item, "delay") > 0 + && uri != NULL && strcmp (uri, "about:blank") != 0) { gchar* new_uri; - new_uri = g_strdup_printf ("pause:%s", katze_item_get_uri (item)); + new_uri = g_strdup_printf ("pause:%s", uri); midori_view_set_uri (MIDORI_VIEW (view), new_uri); g_free (new_uri); } else - midori_view_set_uri (MIDORI_VIEW (view), katze_item_get_uri (item)); + midori_view_set_uri (MIDORI_VIEW (view), uri); gtk_widget_show (view); -- 2.39.5