show groupchat icon in groupchat window banner. see #2702. TODO find muc_active.svg to create 32x32 icons
This commit is contained in:
parent
cc09dae0fe
commit
ff7c612f97
2 changed files with 59 additions and 15 deletions
|
@ -18,6 +18,7 @@
|
|||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="msg_window_alignment">
|
||||
|
@ -661,6 +662,27 @@ Status message</property>
|
|||
<property name="visible_window">True</property>
|
||||
<property name="above_child">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox3024">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="gc_banner_status_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">5</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="banner_name_label">
|
||||
<property name="visible">True</property>
|
||||
|
@ -680,6 +702,13 @@ topic</property>
|
|||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
|
|
@ -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'''
|
||||
|
|
Loading…
Add table
Reference in a new issue