[Xfce4-commits] <postler:master> Ensure edit icon exists, otherwise use an arrow

Christian Dywan noreply at xfce.org
Wed Jan 19 02:58:05 CET 2011


Updating branch refs/heads/master
         to b0f29e009226d6be4a6bca062e2bb39bea63f3b5 (commit)
       from 5c1d51459d2b4db54118b03d7be212887f46f060 (commit)

commit b0f29e009226d6be4a6bca062e2bb39bea63f3b5
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Jan 19 00:43:19 2011 +0100

    Ensure edit icon exists, otherwise use an arrow
    
    Fixes: https://bugs.launchpad.net/postler/+bug/685537

 postler/postler-content.vala |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index e76d77c..d852bc0 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -189,7 +189,10 @@ public class Postler.Content : WebKit.WebView {
     internal static string linkify_address (string addresses, string? arguments)
         requires (arguments == null || !arguments.contains ("<")) {
         var linkified = new StringBuilder ();
-        string data_uri = icon_name_to_data_uri ("not-starred");
+        string edit_icon = "<b>←</b>";
+        var icon_theme = Gtk.IconTheme.get_for_screen (Gdk.Screen.get_default ());
+        if (icon_theme.has_icon ("not-starred"))
+            edit_icon = "<img src=\"" + icon_name_to_data_uri ("not-starred") + "\">";
         foreach (string address in addresses.split (",")) {
             if (address == "")
                 continue;
@@ -202,9 +205,8 @@ public class Postler.Content : WebKit.WebView {
                linkified.append (", ");
             linkified.append ("<a href=\"" + quoted + (arguments != null ? arguments : "") +
                 "\" title=\"" + original + "\">" + name + "</a>");
-            linkified.append ((" <a href=\"contact:%s:%s\">"
-                             + "<img src=\"%s\" alt=\"←\"></a>").printf (
-                name, quoted, data_uri));
+            linkified.append ((" <a href=\"contact:%s:%s\">%s</a>").printf (
+                name, quoted, edit_icon));
         }
         return linkified.str;
     }



More information about the Xfce4-commits mailing list