From b70a2569dfbe82b8a5b36aca05418b5bce5c30b7 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 26 Sep 2009 23:56:29 +0200 Subject: [PATCH] Open source of local files directly with no temporary copy --- midori/midori-browser.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 042d8560..9949db01 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -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);