]> spindle.queued.net Git - midori/commitdiff
Copy email addresses without mailto: prefix
authorTomasz Szatkowski <szatkus@gmail.com>
Sat, 26 Feb 2011 15:05:39 +0000 (16:05 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 26 Feb 2011 15:05:39 +0000 (16:05 +0100)
Fixes: https://bugs.launchpad.net/midori/+bug/358650
midori/midori-view.c

index 5669d7883ec538f06a111882446cbf8e001bb2f1..5b5c1781ba0bd4651b73a2828f76a8ff523ad642 100644 (file)
@@ -1981,7 +1981,10 @@ static void
 midori_web_view_menu_link_copy_activate_cb (GtkWidget*  widget,
                                             MidoriView* view)
 {
-    midori_web_view_set_clipboard (widget, view->link_uri);
+    if (g_str_has_prefix (view->link_uri, "mailto:"))
+        midori_web_view_set_clipboard (widget, view->link_uri + 7);
+    else
+        midori_web_view_set_clipboard (widget, view->link_uri);
 }
 
 static void