update gc roster instantly when we change theme. fixes #2766

This commit is contained in:
Yann Leboulanger 2006-12-16 20:12:16 +00:00
parent 257b1b7eeb
commit 3289f8fdd1
2 changed files with 11 additions and 4 deletions

View File

@ -421,6 +421,17 @@ class GroupchatControl(ChatControlBase):
for nick in gajim.contacts.get_nick_list(self.account, self.room_jid):
self.draw_contact(nick)
def _change_style(self, model, path, iter):
model[iter][C_NICK] = model[iter][C_NICK]
def change_roster_style(self):
model = self.list_treeview.get_model()
model.foreach(self._change_style)
def repaint_themed_widgets(self):
ChatControlBase.repaint_themed_widgets(self)
self.change_roster_style()
def _update_banner_state_image(self):
banner_status_img = self.xml.get_widget('gc_banner_status_image')
images = gajim.interface.roster.jabber_state_images

View File

@ -1079,10 +1079,6 @@ class RosterWindow:
model.foreach(self._change_style, option)
for win in gajim.interface.msg_win_mgr.windows():
win.repaint_themed_widgets()
# update gc's roster
for ctrl in gajim.interface.msg_win_mgr.controls():
if ctrl.type_id == message_control.TYPE_GC:
ctrl.update_ui()
def draw_roster(self):
'''clear and draw roster'''