chnage banner style when theme 'banner'

properties change.
This commit is contained in:
Dimitur Kirov 2005-10-05 10:23:48 +00:00
parent 61c64536c8
commit b628d8f849
2 changed files with 9 additions and 4 deletions

View File

@ -1369,13 +1369,18 @@ class Chat:
textcolor = gajim.config.get_per('themes', theme, 'bannertextcolor')
# the backgrounds are colored by using an eventbox by
# setting the bg color of the eventbox and the fg of the name_label
banner_eventbox = self.xmls[jid].get_widget('banner_eventbox')
banner_name_label = self.xmls[jid].get_widget('banner_name_label')
if bgcolor:
self.xmls[jid].get_widget('banner_eventbox').modify_bg(
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
banner_eventbox.modify_bg(gtk.STATE_NORMAL,
gtk.gdk.color_parse(bgcolor))
else:
banner_eventbox.modify_bg(gtk.STATE_NORMAL, None)
if textcolor:
banner_name_label = self.xmls[jid].get_widget('banner_name_label')
banner_name_label.modify_fg(gtk.STATE_NORMAL,
gtk.gdk.color_parse(textcolor))
else:
banner_name_label.modify_fg(gtk.STATE_NORMAL, None)
def repaint_colored_widgets(self):
"""Repaint widgets (banner) in the window/tab with theme color"""

View File

@ -511,8 +511,8 @@ class PreferencesWindow:
# begin repainting themed widgets throughout
self.plugin.roster.repaint_themed_widgets()
self.plugin.roster.change_roster_style(None)
self.plugin.save_config()
self.plugin.roster.draw_roster()
def merge_windows(self, kind):
for acct in gajim.connections: