diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index f4295bd1e..0b8073b13 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -183,6 +183,18 @@ class preference_Window: colSt = '#'+(hex(color.red)+'0')[2:4] + (hex(color.green)+'0')[2:4]\ +(hex(color.blue)+'0')[2:4] self.plugin.config['userbgcolor'] = colSt + #Font for account + fontStr = self.xml.get_widget('fontbutton_account_text').get_font_name() + print fontStr + self.plugin.config['accountfont'] = fontStr + #Font for group + fontStr = self.xml.get_widget('fontbutton_group_text').get_font_name() + print fontStr + self.plugin.config['groupfont'] = fontStr + #Font for user + fontStr = self.xml.get_widget('fontbutton_user_text').get_font_name() + print fontStr + self.plugin.config['userfont'] = fontStr #update opened chat windows for a in self.plugin.accounts.keys(): for w in self.plugin.windows[a]['chats'].keys(): @@ -355,6 +367,18 @@ class preference_Window: colSt = self.plugin.config['userbgcolor'] self.xml.get_widget('colorbutton_user_bg').set_color(\ gtk.gdk.color_parse(colSt)) + + #font for account + fontStr = self.plugin.config['accountfont'] + self.xml.get_widget('fontbutton_account_text').set_font_name(fontStr) + + #font for group + fontStr = self.plugin.config['groupfont'] + self.xml.get_widget('fontbutton_group_text').set_font_name(fontStr) + + #font for account + fontStr = self.plugin.config['userfont'] + self.xml.get_widget('fontbutton_user_text').set_font_name(fontStr) self.xml.signal_connect('gtk_widget_destroy', self.delete_event) self.xml.signal_connect('on_ok_clicked', self.on_ok) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 32fc09eb1..757263a3e 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -1686,24 +1686,21 @@ class roster_Window: self.plugin.config['accounttextcolor']) renderer.set_property('cell-background', \ self.plugin.config['accountbgcolor']) - renderer.set_property('font', 'Normal') - renderer.set_property('weight', 700) + renderer.set_property('font', self.plugin.config['accountfont']) renderer.set_property('xpad', 0) elif model.get_value(iter, 2) == 'group': renderer.set_property('foreground', \ self.plugin.config['grouptextcolor']) renderer.set_property('cell-background', \ self.plugin.config['groupbgcolor']) - renderer.set_property('font', 'Italic') - renderer.set_property('weight-set', False) + renderer.set_property('font', self.plugin.config['groupfont']) renderer.set_property('xpad', 8) else: renderer.set_property('foreground', \ self.plugin.config['usertextcolor']) renderer.set_property('cell-background', \ self.plugin.config['userbgcolor']) - renderer.set_property('font', 'Normal') - renderer.set_property('weight-set', False) + renderer.set_property('font', self.plugin.config['userfont']) renderer.set_property('xpad', 16) def compareIters(self, model, iter1, iter2, data = None): @@ -1771,7 +1768,6 @@ class roster_Window: parent_i = model.iter_parent(iter_source) if model.iter_n_children(parent_i) == 1: #this was the only child model.remove(parent_i) - #TODO: get the good keyID self.add_user_to_roster(data, account) if context.action == gtk.gdk.ACTION_MOVE: context.finish(True, True, etime) @@ -2375,10 +2371,13 @@ class plugin: 'hiddenlines':'',\ 'accounttextcolor': '#ff0000',\ 'accountbgcolor': '#9fdfff',\ + 'accountfont': 'Sans Bold 10',\ 'grouptextcolor': '#0000ff',\ 'groupbgcolor': '#ffffff',\ + 'groupfont': 'Sans Italic 10',\ 'usertextcolor': '#000000',\ - 'userbgcolor': '#ffffff'})) + 'userbgcolor': '#ffffff',\ + 'userfont': 'Sans 10'})) self.config = self.wait('CONFIG') self.send('ASK_CONFIG', None, ('GtkGui', 'accounts')) self.accounts = self.wait('CONFIG')