From e5529eb0ac9d71224013eb26b505f807c8173f6d Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 2 Dec 2005 17:47:52 +0000 Subject: [PATCH] don't write wrong config option when we change option combobox in theme window --- src/gajim_themes_window.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gajim_themes_window.py b/src/gajim_themes_window.py index 419bc08c2..7d04bc185 100644 --- a/src/gajim_themes_window.py +++ b/src/gajim_themes_window.py @@ -161,8 +161,7 @@ class GajimThemesWindow: def set_theme_options(self, theme, option = 'account'): self.no_update = True self.options_combobox.set_active(self.options.index(option)) - textcolor = gajim.config.get_per('themes', theme, - option + 'textcolor') + textcolor = gajim.config.get_per('themes', theme, option + 'textcolor') if textcolor: state = True self.text_colorbutton.set_color(gtk.gdk.color_parse(textcolor)) @@ -180,7 +179,7 @@ class GajimThemesWindow: self.background_checkbutton.set_active(state) self.background_colorbutton.set_sensitive(state) - #get the font name before we set widgets and it will not be overriden + # get the font name before we set widgets and it will not be overriden font_name = gajim.config.get_per('themes', theme, option + 'font') font_attrs = gajim.config.get_per('themes', theme, option + 'fontattrs') self._set_font_widgets(font_attrs) @@ -228,10 +227,12 @@ class GajimThemesWindow: self.current_option) def on_bold_togglebutton_toggled(self, widget): - self._set_font() + if not self.no_update: + self._set_font() def on_italic_togglebutton_toggled(self, widget): - self._set_font() + if not self.no_update: + self._set_font() def _set_color(self, state, widget, option): ''' set color value in prefs and update the UI '''