From ff7c612f97f49ffa43eaa0fbb38facde436e37c9 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 30 Nov 2006 09:05:59 +0000 Subject: [PATCH] show groupchat icon in groupchat window banner. see #2702. TODO find muc_active.svg to create 32x32 icons --- data/glade/message_window.glade | 59 ++++++++++++++++++++++++--------- src/groupchat_control.py | 15 +++++++++ 2 files changed, 59 insertions(+), 15 deletions(-) diff --git a/data/glade/message_window.glade b/data/glade/message_window.glade index d4678bfd3..56a2c3d74 100644 --- a/data/glade/message_window.glade +++ b/data/glade/message_window.glade @@ -18,6 +18,7 @@ GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + False @@ -662,23 +663,51 @@ Status message False - diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 3d81a68f3..1fcf12701 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -417,6 +417,21 @@ class GroupchatControl(ChatControlBase): for nick in gajim.contacts.get_nick_list(self.account, self.room_jid): self.draw_contact(nick) + def _update_banner_state_image(self): + banner_status_img = self.xml.get_widget('gc_banner_status_image') + images = gajim.interface.roster.jabber_state_images + if images.has_key('32') and images['32'].has_key('muc_active'): + muc_icon = images['32']['muc_active'] + if muc_icon.get_storage_type() != gtk.IMAGE_EMPTY: + pix = muc_icon.get_pixbuf() + banner_status_img.set_from_pixbuf(pix) + return + # we need to scale 16x16 to 32x32 + muc_icon = images['16']['muc_active'] + pix = muc_icon.get_pixbuf() + scaled_pix = pix.scale_simple(32, 32, gtk.gdk.INTERP_BILINEAR) + banner_status_img.set_from_pixbuf(scaled_pix) + def prepare_context_menu(self): '''sets compact view menuitem active state sets sensitivity state for configure_room'''