From 9554d2c8f50a6805c6bd96028a5b943c567a8b7f Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Wed, 2 Nov 2005 16:34:35 +0000 Subject: [PATCH] remove U it is not needed nor works; remove it also from glade, remove crazy hboxing and use fill and other similar properties --- src/gajim_themes_window.py | 20 +-- src/gtkgui.glade | 335 ++++++++++++++----------------------- 2 files changed, 135 insertions(+), 220 deletions(-) diff --git a/src/gajim_themes_window.py b/src/gajim_themes_window.py index 8a026166a..17f5e866f 100644 --- a/src/gajim_themes_window.py +++ b/src/gajim_themes_window.py @@ -40,7 +40,7 @@ class GajimThemesWindow: self.xml = gtk.glade.XML(GTKGUI_GLADE, 'gajim_themes_window', APP) self.window = self.xml.get_widget('gajim_themes_window') - self.options = ['account', 'group', 'contact', 'banner', 'lastmessage'] + self.options = ['account', 'group', 'contact', 'banner'] self.options_combobox = self.xml.get_widget('options_combobox') self.textcolor_checkbutton = self.xml.get_widget('textcolor_checkbutton') self.background_checkbutton = self.xml.get_widget('background_checkbutton') @@ -50,7 +50,6 @@ class GajimThemesWindow: self.text_fontbutton = self.xml.get_widget('text_fontbutton') self.bold_togglebutton = self.xml.get_widget('bold_togglebutton') self.italic_togglebutton = self.xml.get_widget('italic_togglebutton') - self.underline_togglebutton = self.xml.get_widget('underline_togglebutton') self.themes_tree = self.xml.get_widget('themes_treeview') self.theme_options_vbox = self.xml.get_widget('theme_options_vbox') model = gtk.ListStore(str) @@ -151,7 +150,8 @@ class GajimThemesWindow: return if self.current_theme == gajim.config.get('roster_theme'): dialogs.ErrorDialog( - _('You cannot delete your current theme')).get_response() + _('You cannot delete your current theme'), + _('Please first choose another for your current theme')).get_response() return self.theme_options_vbox.set_sensitive(False) gajim.config.del_per('themes', self.current_theme) @@ -233,9 +233,6 @@ class GajimThemesWindow: def on_italic_togglebutton_toggled(self, widget): self._set_font() - def on_underline_togglebutton_toggled(self, widget): - self._set_font() - def _set_color(self, state, widget, option): ''' set color value in prefs and update the UI ''' if state: @@ -279,7 +276,6 @@ class GajimThemesWindow: ''' toggle font buttons with the bool values of font_props tuple''' self.bold_togglebutton.set_active(font_props[0]) self.italic_togglebutton.set_active(font_props[1]) - self.underline_togglebutton.set_active(font_props[2]) def _get_font_description(self): ''' return a FontDescription from togglebuttons @@ -293,31 +289,27 @@ class GajimThemesWindow: def _set_font_widgets(self, font_attrs): ''' set the correct toggle state of font style buttons by - a font string of type 'BIU' ''' + a font string of type 'BI' ''' font_props = [False, False, False] if font_attrs: if font_attrs.find('B') != -1: font_props[0] = True if font_attrs.find('I') != -1: font_props[1] = True - if font_attrs.find('U') != -1: - font_props[2] = True self._toggle_font_widgets(font_props) def _get_font_attrs(self): - ''' get a string with letters of font attribures: 'BUI' ''' + ''' get a string with letters of font attribures: 'BI' ''' attrs = '' if self.bold_togglebutton.get_active(): attrs += 'B' if self.italic_togglebutton.get_active(): attrs += 'I' - if self.underline_togglebutton.get_active(): - attrs += 'U' return attrs def _get_font_props(self, font_name): - ''' get tuple of font properties: Weight, Style, Underline ''' + ''' get tuple of font properties: Weight, Style ''' font_props = [False, False, False] font_description = pango.FontDescription(font_name) if font_description.get_weight() != pango.WEIGHT_NORMAL: diff --git a/src/gtkgui.glade b/src/gtkgui.glade index 3dd62b962..5e8672b78 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -16257,55 +16257,11 @@ Last Message True 4 - 3 + 4 False 6 6 - - - True - False - 6 - - - - True - False - 6 - - - - True - False - True - False - True - - - - 0 - False - False - - - - - 0 - True - True - - - - - 2 - 3 - 1 - 2 - fill - - - True @@ -16329,38 +16285,6 @@ Last Message - - - True - False - 6 - - - - True - False - True - False - True - - - - 0 - False - False - - - - - 2 - 3 - 0 - 1 - fill - fill - - - True @@ -16384,29 +16308,6 @@ Last Message - - - 15 - True - False - True - False - True - False - False - True - - - - 2 - 3 - 2 - 3 - fill - - - - True @@ -16430,112 +16331,6 @@ Last Message - - - True - False - 6 - - - - True - Bold - True - GTK_RELIEF_NORMAL - True - False - False - - - - - True - gtk-bold - 4 - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - - - - - - True - Italic - True - GTK_RELIEF_NORMAL - True - False - False - - - - - True - gtk-italic - 4 - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - - - - - - True - Underline - True - GTK_RELIEF_NORMAL - True - False - False - - - - - True - gtk-underline - 4 - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - - - - - 2 - 3 - 3 - 4 - fill - fill - - - True @@ -16549,6 +16344,7 @@ Last Message 0.5 0 0 + bold_togglebutton PANGO_ELLIPSIZE_NONE -1 False @@ -16577,6 +16373,133 @@ Last Message fill + + + + 15 + True + False + True + False + True + False + False + True + + + + 2 + 4 + 2 + 3 + fill + + + + + + + True + False + True + False + True + + + + 3 + 4 + 0 + 1 + + + + + + + + True + False + True + False + True + + + + 3 + 4 + 1 + 2 + + + + + + + + True + Bold + True + GTK_RELIEF_NORMAL + True + False + False + + + + + True + gtk-bold + 4 + 0.5 + 0.5 + 0 + 0 + + + + + 2 + 3 + 3 + 4 + fill + + + + + + + True + Italic + True + GTK_RELIEF_NORMAL + True + False + False + + + + + True + gtk-italic + 4 + 0.5 + 0.5 + 0 + 0 + + + + + 3 + 4 + 3 + 4 + + + + 0