bugfix when we remove an account

This commit is contained in:
Yann Leboulanger 2005-05-07 14:36:07 +00:00
parent 413ea7b6e7
commit 69ba1d3198
1 changed files with 1 additions and 4 deletions

View File

@ -2057,9 +2057,8 @@ class Remove_account_window:
if gajim.connections[self.account].connected: #FIXME: user unfriendly?? if gajim.connections[self.account].connected: #FIXME: user unfriendly??
gajim.connections[self.account].change_status('offline', 'offline') gajim.connections[self.account].change_status('offline', 'offline')
unregister = False
if self.remove_and_unregister_radiobutton.get_active(): if self.remove_and_unregister_radiobutton.get_active():
unregister = True gajim.connections[self.account].remove_account()
del gajim.connections[self.account] del gajim.connections[self.account]
gajim.config.del_per('accounts', self.account) gajim.config.del_per('accounts', self.account)
del self.plugin.windows[self.account] del self.plugin.windows[self.account]
@ -2071,6 +2070,4 @@ class Remove_account_window:
self.plugin.roster.draw_roster() self.plugin.roster.draw_roster()
if self.plugin.windows.has_key('accounts'): if self.plugin.windows.has_key('accounts'):
self.plugin.windows['accounts'].init_accounts() self.plugin.windows['accounts'].init_accounts()
if unregister:
gajim.connections[self.account].remove_account()
self.window.destroy() self.window.destroy()