few lines less code in a block

This commit is contained in:
Nikos Kouremenos 2005-06-10 20:13:37 +00:00
parent b23b2eac9a
commit f3cf1b1f66
1 changed files with 11 additions and 17 deletions

View File

@ -795,25 +795,19 @@ class Chat:
def repaint_colored_widgets(self):
"""Repaint widgets (banner) in the window/tab with theme color"""
# get the bg color of the bar from the current theme colors
bgcolor = gajim.config.get('accountbgcolor')
bgcolor = gajim.config.get('accountbgcolor') #FIXME: use uniq color
# iterate through tabs/windows and repaint
for jid in self.xmls:
if self.widget_name == 'tabbed_chat_window':
banner_status_eventbox = self.xmls[jid].get_widget(
'banner_status_eventbox')
banner_status_eventbox.modify_bg(gtk.STATE_NORMAL,
gtk.gdk.color_parse(bgcolor))
banner_name_eventbox = self.xmls[jid].get_widget(
'banner_name_eventbox')
banner_name_eventbox.modify_bg(gtk.STATE_NORMAL,
gtk.gdk.color_parse(bgcolor))
banner_avatar_eventbox = self.xmls[jid].get_widget(
'banner_avatar_eventbox')
banner_avatar_eventbox.modify_bg(gtk.STATE_NORMAL,
gtk.gdk.color_parse(bgcolor))
self.xmls[jid].get_widget('banner_status_eventbox').modify_bg(
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
self.xmls[jid].get_widget('banner_typing_eventbox').modify_bg(
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
self.xmls[jid].get_widget('banner_name_eventbox').modify_bg(
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
self.xmls[jid].get_widget('banner_avatar_eventbox').modify_bg(
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
elif self.widget_name == 'groupchat_window':
banner_name_eventbox = self.xmls[jid].get_widget(
'banner_name_eventbox')
banner_name_eventbox.modify_bg(gtk.STATE_NORMAL,
gtk.gdk.color_parse(bgcolor))
self.xmls[jid].get_widget('banner_name_eventbox').modify_bg(
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))