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):
|
def repaint_colored_widgets(self):
|
||||||
"""Repaint widgets (banner) in the window/tab with theme color"""
|
"""Repaint widgets (banner) in the window/tab with theme color"""
|
||||||
# get the bg color of the bar from the current theme colors
|
# 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
|
# iterate through tabs/windows and repaint
|
||||||
for jid in self.xmls:
|
for jid in self.xmls:
|
||||||
if self.widget_name == 'tabbed_chat_window':
|
if self.widget_name == 'tabbed_chat_window':
|
||||||
banner_status_eventbox = self.xmls[jid].get_widget(
|
self.xmls[jid].get_widget('banner_status_eventbox').modify_bg(
|
||||||
'banner_status_eventbox')
|
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
|
||||||
banner_status_eventbox.modify_bg(gtk.STATE_NORMAL,
|
self.xmls[jid].get_widget('banner_typing_eventbox').modify_bg(
|
||||||
gtk.gdk.color_parse(bgcolor))
|
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
|
||||||
banner_name_eventbox = self.xmls[jid].get_widget(
|
self.xmls[jid].get_widget('banner_name_eventbox').modify_bg(
|
||||||
'banner_name_eventbox')
|
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
|
||||||
banner_name_eventbox.modify_bg(gtk.STATE_NORMAL,
|
self.xmls[jid].get_widget('banner_avatar_eventbox').modify_bg(
|
||||||
gtk.gdk.color_parse(bgcolor))
|
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))
|
|
||||||
elif self.widget_name == 'groupchat_window':
|
elif self.widget_name == 'groupchat_window':
|
||||||
banner_name_eventbox = self.xmls[jid].get_widget(
|
self.xmls[jid].get_widget('banner_name_eventbox').modify_bg(
|
||||||
'banner_name_eventbox')
|
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
|
||||||
banner_name_eventbox.modify_bg(gtk.STATE_NORMAL,
|
|
||||||
gtk.gdk.color_parse(bgcolor))
|
|
||||||
|
|
Loading…
Reference in New Issue