[Xfce4-commits] <midori:master> Show 'Send a message to <mail address>' when hovering email links

Christian Dywan noreply at xfce.org
Thu Oct 1 02:40:02 CEST 2009


Updating branch refs/heads/master
         to 1535bc89708ab1b6c83ecea931549c85767c3178 (commit)
       from 037be4dda44e622e2c33728e2cd55c4579c4d8df (commit)

commit 1535bc89708ab1b6c83ecea931549c85767c3178
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Sep 30 23:54:40 2009 +0200

    Show 'Send a message to <mail address>' when hovering email links

 midori/midori-view.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index ed06281..109769f 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -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 \



More information about the Xfce4-commits mailing list