From 84ade2e3aca625ba0bc6ad06a2480b7966763876 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 18 Mar 2006 09:22:27 +0000 Subject: [PATCH] prevent TB --- src/chat_control.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/chat_control.py b/src/chat_control.py index be4d6a5c0..2c7b2fd79 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -1460,10 +1460,13 @@ class ChatControl(ChatControlBase): def show_bigger_avatar(self, small_avatar): '''resizes the avatar, if needed, so it has at max half the screen size and shows it''' - real_jid = gajim.get_real_jid_from_fjid(self.account, self.contact.jid) - if not real_jid: # this can happend if we're in a moderate room + is_fake = False + if self.type_id == message_control.TYPE_PM: + is_fake = True + avatar_pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(real_jid, + is_fake) + if avatar_pixbuf in ('ask', None): return - # Hide the small avatar # this code hides the small avatar when we show a bigger one in case # the avatar has a transparency hole in the middle @@ -1474,11 +1477,6 @@ class ChatControl(ChatControlBase): pixbuf.fill(0xffffff00) # RGBA image.queue_draw() - is_fake = False - if self.type_id == message_control.TYPE_PM: - is_fake = True - avatar_pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(real_jid, - is_fake) screen_w = gtk.gdk.screen_width() screen_h = gtk.gdk.screen_height() avatar_w = avatar_pixbuf.get_width()