From 9ede8bf2560bb1c5b9ebbed9d6030d3053a58f9f Mon Sep 17 00:00:00 2001
From: Denis Fomin <fominde@gmail.com>
Date: Tue, 30 Apr 2013 17:05:17 +0400
Subject: [PATCH] EmoticonsPackPlugin. Show animated emoticons in Legend

---
 emoticons_pack/emoticons_pack.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/emoticons_pack/emoticons_pack.py b/emoticons_pack/emoticons_pack.py
index 1f0f5af4..e0b3919d 100644
--- a/emoticons_pack/emoticons_pack.py
+++ b/emoticons_pack/emoticons_pack.py
@@ -158,7 +158,15 @@ class EmoticonsPackPlugin(GajimPlugin):
                 pbl = GdkPixbuf.PixbufLoader()
                 pbl.write(data)
                 pbl.close()
-                buff.insert_pixbuf(buff.get_end_iter(), pbl.get_pixbuf())
+                if icon.endswith('.gif'):
+                    img = Gtk.Image()
+                    img.set_from_animation(pbl.get_animation())
+                    img.show()
+                    anchor = buff.create_child_anchor(buff.get_end_iter())
+                    self.emoticons_description_textview.add_child_at_anchor(
+                        img, anchor)
+                else:
+                    buff.insert_pixbuf(buff.get_end_iter(), pbl.get_pixbuf())
                 text = ' , '.join(emoticons.emoticons[icon])
                 buff.insert(buff.get_end_iter(), text + '\n', -1)
 
-- 
GitLab