[Xfce4-commits] <midori:master> Try hard to open bookmarks if they have an incomplete address

Christian Dywan noreply at xfce.org
Mon Nov 30 19:38:04 CET 2009


Updating branch refs/heads/master
         to 557fdda2287ba95d9eabfeda1eac18700767ae1c (commit)
       from a1cdf0bf4ec66a9374f9e3dcab0ca708df4de615 (commit)

commit 557fdda2287ba95d9eabfeda1eac18700767ae1c
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Nov 30 19:25:39 2009 +0100

    Try hard to open bookmarks if they have an incomplete address

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

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index cb153d2..dea7693 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -2869,17 +2869,23 @@ midori_browser_open_bookmark (MidoriBrowser* browser,
                               KatzeItem*     item)
 {
     const gchar* uri = katze_item_get_uri (item);
+    gchar* uri_fixed;
+
     if (!(uri && *uri))
         return;
 
+    /* Imported bookmarks may lack a protocol */
+    uri_fixed = sokoke_magic_uri (uri, NULL);
+
     /* FIXME: Use the same binary that is running right now */
     if (katze_item_get_meta_integer (item, "app") != -1)
-        sokoke_spawn_program ("midori -a", uri, FALSE);
+        sokoke_spawn_program ("midori -a", uri_fixed, FALSE);
     else
     {
-        midori_browser_set_current_uri (browser, uri);
+        midori_browser_set_current_uri (browser, uri_fixed);
         gtk_widget_grab_focus (midori_browser_get_current_tab (browser));
     }
+    g_free (uri_fixed);
 }
 
 static void



More information about the Xfce4-commits mailing list