]> spindle.queued.net Git - midori/commitdiff
Show 'Send a message to <mail address>' when hovering email links
authorChristian Dywan <christian@twotoasts.de>
Wed, 30 Sep 2009 21:54:40 +0000 (23:54 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 30 Sep 2009 21:55:39 +0000 (23:55 +0200)
midori/midori-view.c

index ed062813c9526b69843b5a90cc210027ac32a738..109769f92238f0cc2823a54c8a7213a1a5ce0be1 100644 (file)
@@ -1077,7 +1077,14 @@ webkit_web_view_hovering_over_link_cb (WebKitWebView* web_view,
                                        MidoriView*    view)
 {
     katze_assign (view->link_uri, g_strdup (link_uri));
-    g_object_set (G_OBJECT (view), "statusbar-text", link_uri, NULL);
+    if (link_uri && g_str_has_prefix (link_uri, "mailto:"))
+    {
+        gchar* text = g_strdup_printf (_("Send a message to %s"), &link_uri[7]);
+        g_object_set (G_OBJECT (view), "statusbar-text", text, NULL);
+        g_free (text);
+    }
+    else
+        g_object_set (G_OBJECT (view), "statusbar-text", link_uri, NULL);
 }
 
 #define MIDORI_KEYS_MODIFIER_MASK (GDK_SHIFT_MASK | GDK_CONTROL_MASK \