From 5406f2c3c6675b610a1273c431a362cb2c8541c2 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Tue, 29 Nov 2005 17:13:13 +0000 Subject: [PATCH] [SF] move merge accounts to accounts window; also fix spacing in that window --- src/config.py | 19 ++++++++++--------- src/gtkgui.glade | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/src/config.py b/src/config.py index d47cb180b..5ecb5c48a 100644 --- a/src/config.py +++ b/src/config.py @@ -105,10 +105,6 @@ class PreferencesWindow: st = gajim.config.get('saveposition') self.xml.get_widget('save_position_checkbutton').set_active(st) - #Merge accounts - st = gajim.config.get('mergeaccounts') - self.xml.get_widget('merge_checkbutton').set_active(st) - # Sort contacts by show st = gajim.config.get('sort_by_show') self.xml.get_widget('sort_by_show_checkbutton').set_active(st) @@ -470,11 +466,6 @@ class PreferencesWindow: def on_save_position_checkbutton_toggled(self, widget): self.on_checkbutton_toggled(widget, 'saveposition') - def on_merge_checkbutton_toggled(self, widget): - self.on_checkbutton_toggled(widget, 'mergeaccounts') - gajim.interface.roster.regroup = gajim.config.get('mergeaccounts') - gajim.interface.roster.draw_roster() - def on_sort_by_show_checkbutton_toggled(self, widget): self.on_checkbutton_toggled(widget, 'sort_by_show') gajim.interface.roster.draw_roster() @@ -1646,6 +1637,10 @@ class AccountsWindow: self.init_accounts() self.window.show_all() + #Merge accounts + st = gajim.config.get('mergeaccounts') + self.xml.get_widget('merge_checkbutton').set_active(st) + def on_accounts_window_key_press_event(self, widget, event): if event.keyval == gtk.keysyms.Escape: self.window.destroy() @@ -1710,6 +1705,12 @@ class AccountsWindow: gajim.interface.instances[account]['account_modification'] = \ AccountModificationWindow(account) + def on_merge_checkbutton_toggled(self, widget): + gajim.config.set('mergeaccounts', widget.get_active()) + gajim.interface.save_config() + gajim.interface.roster.regroup = gajim.config.get('mergeaccounts') + gajim.interface.roster.draw_roster() + class DataFormWindow: def __init__(self, account, config): self.account = account diff --git a/src/gtkgui.glade b/src/gtkgui.glade index 7c07e020b..709b30ade 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -424,13 +424,13 @@ - + True False - 12 + 6 - + True True GTK_POLICY_AUTOMATIC @@ -461,6 +461,27 @@ + + + True + If you have 2 or more accounts and it is checked, Gajim will list all contacts as if you had one account + True + _Merge accounts + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + True @@ -3325,27 +3346,6 @@ Agent JID - node - - - True - If you have 2 or more accounts and it is checked, Gajim will list all contacts as if you had one account - True - _Merge accounts - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - True