ask password when we want to delete an account from server and we don't save password

This commit is contained in:
Yann Leboulanger 2005-12-10 16:18:37 +00:00
parent 45479d7708
commit edfafe964f
1 changed files with 11 additions and 0 deletions

View File

@ -2176,6 +2176,17 @@ class RemoveAccountWindow:
gajim.connections[self.account].change_status('offline', 'offline') gajim.connections[self.account].change_status('offline', 'offline')
if self.remove_and_unregister_radiobutton.get_active(): if self.remove_and_unregister_radiobutton.get_active():
if not gajim.connections[self.account].password:
passphrase = ''
w = dialogs.PassphraseDialog(
_('Password Required'),
_('Enter your password for account %s') % self.account,
_('Save password'))
passphrase, save = w.run()
if passphrase == -1:
# We don't remove account cause we canceled pw window
return
gajim.connections[self.account].password = passphrase
gajim.connections[self.account].unregister_account() gajim.connections[self.account].unregister_account()
# Close all opened windows # Close all opened windows
gajim.interface.roster.close_all(gajim.interface.instances[self.account]) gajim.interface.roster.close_all(gajim.interface.instances[self.account])