[SF] don't use merge if only one account Fixes #1180
This commit is contained in:
parent
3dfba9098d
commit
ed134c32ed
|
@ -1622,7 +1622,10 @@ class AccountsWindow:
|
|||
def on_merge_checkbutton_toggled(self, widget):
|
||||
gajim.config.set('mergeaccounts', widget.get_active())
|
||||
gajim.interface.save_config()
|
||||
if len(gajim.connections) >= 2: # Do not merge accounts if only one exists
|
||||
gajim.interface.roster.regroup = gajim.config.get('mergeaccounts')
|
||||
else:
|
||||
gajim.interface.roster.regroup = False
|
||||
gajim.interface.roster.draw_roster()
|
||||
|
||||
class DataFormWindow:
|
||||
|
@ -2219,6 +2222,10 @@ class RemoveAccountWindow:
|
|||
del gajim.last_message_time[self.account]
|
||||
del gajim.status_before_autoaway[self.account]
|
||||
del gajim.events_for_ui[self.account]
|
||||
if len(gajim.connections) >= 2: # Do not merge accounts if only one exists
|
||||
gajim.interface.roster.regroup = gajim.config.get('mergeaccounts')
|
||||
else:
|
||||
gajim.interface.roster.regroup = False
|
||||
gajim.interface.roster.draw_roster()
|
||||
if gajim.interface.instances.has_key('accounts'):
|
||||
gajim.interface.instances['accounts'].init_accounts()
|
||||
|
@ -2767,5 +2774,9 @@ _('You can set advanced account options by pressing Advanced button, or later by
|
|||
if gajim.interface.instances.has_key('accounts'):
|
||||
gajim.interface.instances['accounts'].init_accounts()
|
||||
# refresh roster
|
||||
if len(gajim.connections) >= 2: # Do not merge accounts if only one exists
|
||||
gajim.interface.roster.regroup = gajim.config.get('mergeaccounts')
|
||||
else:
|
||||
gajim.interface.roster.regroup = False
|
||||
gajim.interface.roster.draw_roster()
|
||||
gajim.interface.save_config()
|
||||
|
|
|
@ -2631,6 +2631,8 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
|||
self.service_disco_handler_id = False
|
||||
self.new_message_menuitem_handler_id = False
|
||||
self.regroup = gajim.config.get('mergeaccounts')
|
||||
if len(gajim.connections) < 2: # Do not merge accounts if only one exists
|
||||
self.regroup = False
|
||||
#FIXME: When list_accel_closures will be wrapped in pygtk
|
||||
# no need of this variable
|
||||
self.have_new_message_accel = False # Is the "Ctrl+N" shown ?
|
||||
|
|
Loading…
Reference in New Issue