few lines less code in a block
This commit is contained in:
parent
b23b2eac9a
commit
f3cf1b1f66
28
src/chat.py
28
src/chat.py
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue