From: Dale Whittaker Date: Tue, 8 Sep 2009 21:58:58 +0000 (+0200) Subject: Prepend 'mailto' to email links in the About dialogue X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39f095a0cf211219ee70e7c176792914f458cf4d;p=midori Prepend 'mailto' to email links in the About dialogue Some email clients require this to open email links. --- 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