diff --git a/midori/midori-view.c b/midori/midori-view.c index e6e9f023..633b8312 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -1803,6 +1803,16 @@ midori_view_set_uri (MidoriView* view, { midori_view_execute_script (view, &uri[11], NULL); } + else if (g_str_has_prefix (uri, "mailto:")) + { + if (!gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, NULL)) + { + /* Fallback to Exo for example if GConf isn't setup */ + gchar* command = g_strconcat ("exo-open ", uri, NULL); + g_spawn_command_line_async (command, NULL); + g_free (command); + } + } else { katze_assign (view->uri, g_strdup (uri)); diff --git a/midori/sokoke.c b/midori/sokoke.c index c073e1fa..fc1e716d 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -220,8 +220,8 @@ sokoke_magic_uri (const gchar* uri, g_return_val_if_fail (!search_engines || katze_array_is_a (search_engines, KATZE_TYPE_ITEM), NULL); - /* Just return if it's a javascript: uri */ - if (g_str_has_prefix (uri, "javascript:")) + /* Just return if it's a javascript: or mailto: uri */ + if (g_str_has_prefix (uri, "javascript:") || g_str_has_prefix (uri, "mailto:")) return g_strdup (uri); /* Add file:// if we have a local path */ if (g_path_is_absolute (uri))