[Xfce4-commits] <midori:master> Check more carefully that app/ private got URLs

Christian Dywan noreply at xfce.org
Mon Mar 11 01:12:04 CET 2013


Updating branch refs/heads/master
         to e612e5923a2502706cc6fbf10ec1b98284ccaf81 (commit)
       from c382eb25af0b13debd047d44947adcb682e03181 (commit)

commit e612e5923a2502706cc6fbf10ec1b98284ccaf81
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Mar 11 01:01:44 2013 +0100

    Check more carefully that app/ private got URLs
    
    Fixes: https://bugs.launchpad.net/midori/+bug/1152590

 midori/midori-frontend.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/midori/midori-frontend.c b/midori/midori-frontend.c
index 963cb6a..47593ba 100644
--- a/midori/midori-frontend.c
+++ b/midori/midori-frontend.c
@@ -45,6 +45,8 @@ midori_web_app_new (const gchar* config,
                     gint         inactivity_reset,
                     const gchar* block_uris)
 {
+    guint i;
+
     midori_paths_init (MIDORI_RUNTIME_MODE_APP, config);
 #ifndef HAVE_WEBKIT2
     g_object_set_data (G_OBJECT (webkit_get_default_session ()), "pass-through-console", (void*)1);
@@ -84,11 +86,7 @@ midori_web_app_new (const gchar* config,
         midori_browser_add_uri (browser, tmp_uri);
         g_free (tmp_uri);
     }
-    else if (open_uris == NULL)
-        midori_browser_add_uri (browser, "about:blank");
-    gtk_widget_show (GTK_WIDGET (browser));
 
-    guint i;
     if (open_uris != NULL)
         for (i = 0; open_uris[i] != NULL; i++)
         {
@@ -96,6 +94,9 @@ midori_web_app_new (const gchar* config,
             midori_browser_add_uri (browser, new_uri);
             g_free (new_uri);
         }
+    if (midori_browser_get_n_pages (browser) == 0)
+        midori_browser_add_uri (browser, "about:blank");
+    gtk_widget_show (GTK_WIDGET (browser));
 
     if (execute_commands != NULL)
         for (i = 0; execute_commands[i] != NULL; i++)
@@ -145,6 +146,8 @@ midori_private_app_new (const gchar* config,
                         gint         inactivity_reset,
                         const gchar* block_uris)
 {
+    guint i;
+
     midori_paths_init (MIDORI_RUNTIME_MODE_PRIVATE, config);
 #ifndef HAVE_WEBKIT2
     g_object_set_data (G_OBJECT (webkit_get_default_session ()), "pass-through-console", (void*)1);
@@ -211,11 +214,7 @@ midori_private_app_new (const gchar* config,
         midori_browser_add_uri (browser, tmp_uri);
         g_free (tmp_uri);
     }
-    else if (open_uris == NULL)
-        midori_browser_add_uri (browser, "about:private");
-    gtk_widget_show (GTK_WIDGET (browser));
 
-    guint i;
     if (open_uris != NULL)
         for (i = 0; open_uris[i] != NULL; i++)
         {
@@ -223,6 +222,9 @@ midori_private_app_new (const gchar* config,
             midori_browser_add_uri (browser, new_uri);
             g_free (new_uri);
         }
+    if (midori_browser_get_n_pages (browser) == 0)
+        midori_browser_add_uri (browser, "about:private");
+    gtk_widget_show (GTK_WIDGET (browser));
 
     if (execute_commands != NULL)
         for (i = 0; execute_commands[i] != NULL; i++)


More information about the Xfce4-commits mailing list