[B.Steinbrink & me] improve perfrmences when using animated emoticons. see #2933

This commit is contained in:
Yann Leboulanger 2007-02-07 08:59:40 +00:00
parent 6d30138e80
commit 0a10659b07
1 changed files with 8 additions and 4 deletions

View File

@ -587,7 +587,11 @@ class ConversationTextview:
end_iter = buffer.get_end_iter()
anchor = buffer.create_child_anchor(end_iter)
img = gtk.Image()
img.set_from_file(gajim.interface.emoticons[emot_ascii])
animations = gajim.interface.emoticons_animations
if not emot_ascii in animations:
animations[emot_ascii] = gtk.gdk.PixbufAnimation(
gajim.interface.emoticons[emot_ascii])
img.set_from_animation(animations[emot_ascii])
img.show()
# add with possible animation
self.tv.add_child_at_anchor(img, anchor)