]> spindle.queued.net Git - midori/commitdiff
Open source of local files directly with no temporary copy
authorChristian Dywan <christian@twotoasts.de>
Sat, 26 Sep 2009 21:56:29 +0000 (23:56 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 27 Sep 2009 14:19:10 +0000 (16:19 +0200)
midori/midori-browser.c

index 042d8560c989d0ba29c6e76177b160e41fab5e07..9949db01eacab77c513cbbdb54c8ade658948c73 100644 (file)
@@ -3147,6 +3147,13 @@ _action_source_view_activate (GtkAction*     action,
         #endif
     }
 
+    if (g_str_has_prefix (uri, "file://"))
+    {
+        gchar* filename = g_filename_from_uri (uri, NULL, NULL);
+        sokoke_spawn_program (text_editor, filename, TRUE);
+        g_free (filename);
+        return;
+    }
     katze_net_load_uri (browser->net, uri, NULL,
         (KatzeNetTransferCb)midori_browser_source_transfer_cb, browser);
     g_free (text_editor);