From edfafe964f0a6048da4c6923234e647fdc1faa27 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Sat, 10 Dec 2005 16:18:37 +0000 Subject: [PATCH] ask password when we want to delete an account from server and we don't save password --- src/config.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/config.py b/src/config.py index cb78a8ae0f..01865046bf 100644 --- a/src/config.py +++ b/src/config.py @@ -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]) -- GitLab