[Xfce4-commits] <midori:master> Always add blank pages without delay

Christian Dywan noreply at xfce.org
Sun Jun 6 23:56:02 CEST 2010


Updating branch refs/heads/master
         to dcf1bb5356d90784ae872ad7b45ca5f622d068d8 (commit)
       from 31885fe2be99fbe7acd78f658e01db8d98b17b16 (commit)

commit dcf1bb5356d90784ae872ad7b45ca5f622d068d8
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Jun 6 23:46:10 2010 +0200

    Always add blank pages without delay

 midori/midori-browser.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 6acba91..a3fe1d9 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);
 



More information about the Xfce4-commits mailing list