[Xfce4-commits] <postler:master> Always append original token if emoticon failed

Christian Dywan noreply at xfce.org
Mon May 31 21:30:02 CEST 2010


Updating branch refs/heads/master
         to a5ad154854aa3f419b1ee9791739a70d048e79aa (commit)
       from e49eff41725bc101542cacfed0bf2678363fe5f7 (commit)

commit a5ad154854aa3f419b1ee9791739a70d048e79aa
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon May 31 21:18:15 2010 +0200

    Always append original token if emoticon failed

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

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index e145da5..94b040f 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -124,16 +124,21 @@ public class Postler.Content : WebKit.WebView {
             pixbuf = Gtk.IconTheme.get_for_screen (
                 Gdk.Screen.get_default ()).load_icon (emoticon.icon_name, 1, 0);
         } catch (GLib.Error error) { }
-        if (pixbuf == null)
-            true;
+        if (pixbuf == null) {
+            result.append (" " + emoticon.token);
+            return true;
+        }
         string buffer;
         size_t buffer_size;
         try {
             if (!Gdk.pixbuf_save_to_buffer (pixbuf, out buffer,
-                out buffer_size, "png", null, null))
-            return true;
+                out buffer_size, "png", null, null)) {
+                result.append (" " + emoticon.token);
+                return true;
+            }
         }
         catch (GLib.Error error) {
+            result.append (" " + emoticon.token);
             return true;
         }
 



More information about the Xfce4-commits mailing list