From 39f095a0cf211219ee70e7c176792914f458cf4d Mon Sep 17 00:00:00 2001 From: Dale Whittaker Date: Tue, 8 Sep 2009 23:58:58 +0200 Subject: [PATCH] Prepend 'mailto' to email links in the About dialogue Some email clients require this to open email links. --- midori/midori-browser.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 50d25704..eb0cf7ee 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3966,7 +3966,13 @@ _action_about_activate_email (GtkAboutDialog* about, const gchar* uri, gpointer user_data) { - sokoke_show_uri (NULL, uri, GDK_CURRENT_TIME, NULL); + /* Some email clients need the 'mailto' to function properly */ + gchar* newuri = NULL; + if (!g_str_has_prefix (uri, "mailto:")) + newuri = g_strconcat ("mailto:", uri, NULL); + + sokoke_show_uri (NULL, newuri ? newuri : uri, GDK_CURRENT_TIME, NULL); + g_free (newuri); } static void -- 2.39.5