make small avatar transparent when we show the big one

This commit is contained in:
Yann Leboulanger 2006-02-21 12:59:29 +00:00
parent 2dcc72cb36
commit cce6c97e7c
1 changed files with 8 additions and 0 deletions

View File

@ -1414,6 +1414,12 @@ class ChatControl(ChatControlBase):
real_jid = gajim.get_real_jid_from_fjid(self.account, self.contact.jid) 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 if not real_jid: # this can happend if we're in a moderate room
return return
# Hide the small avatar
image = self.xml.get_widget('avatar_image')
pixbuf = image.get_pixbuf()
pixbuf.fill(0xffffff00)
image.queue_draw()
avatar_pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(real_jid) avatar_pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(real_jid)
screen_w = gtk.gdk.screen_width() screen_w = gtk.gdk.screen_width()
screen_h = gtk.gdk.screen_height() screen_h = gtk.gdk.screen_height()
@ -1462,6 +1468,8 @@ class ChatControl(ChatControlBase):
def _on_window_avatar_leave_notify_event(self, widget, event): def _on_window_avatar_leave_notify_event(self, widget, event):
'''we just left the popup window that holds avatar''' '''we just left the popup window that holds avatar'''
self.bigger_avatar_window.destroy() self.bigger_avatar_window.destroy()
# Re-show the small avatar
self.show_avatar()
def _on_window_motion_notify_event(self, widget, event): def _on_window_motion_notify_event(self, widget, event):
'''we just moved the mouse so show the cursor''' '''we just moved the mouse so show the cursor'''