Skip to content
Snippets Groups Projects
Commit edfafe96 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

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

parent 45479d77
No related branches found
No related tags found
No related merge requests found
......@@ -2176,6 +2176,17 @@ def on_remove_button_clicked(self, widget):
gajim.connections[self.account].change_status('offline', 'offline')
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()
# Close all opened windows
gajim.interface.roster.close_all(gajim.interface.instances[self.account])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment