diff --git a/src/common/connection.py b/src/common/connection.py index 901933b62..5f516ca6e 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1631,6 +1631,7 @@ class Connection: self.dispatch('ERROR', (_('Could not connect to "%s"') % hostname, _('Check your connection or try again later'))) return None + self.password = None if not self.connected: # We went offline during connecting process return None if hasattr(con, 'Resource'): diff --git a/src/config.py b/src/config.py index 022b9beae..6eb129207 100644 --- a/src/config.py +++ b/src/config.py @@ -1312,6 +1312,8 @@ class AccountModificationWindow: gajim.config.set_per('accounts', name, opt, config[opt]) if config['savepass']: gajim.connections[name].password = config['password'] + else: + gajim.connections[name].password = None #refresh accounts window if gajim.interface.windows.has_key('accounts'): gajim.interface.windows['accounts'].init_accounts() @@ -2660,6 +2662,8 @@ class AccountCreationWizardWindow: _('You already have an account using this name.')).get_response() return con = connection.Connection(self.account) + if savepass: + con.password = password gajim.events_for_ui[self.account] = [] if not self.modify: con.new_account(self.account, config) diff --git a/src/roster_window.py b/src/roster_window.py index dba978e84..54386ef07 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1302,7 +1302,8 @@ _('If "%s" accepts this request you will know his status.') %jid) self.set_connecting_state(account) save_pass = gajim.config.get_per('accounts', account, 'savepass') - if not save_pass and gajim.connections[account].connected < 2: + if gajim.connections[account].connected < 2 and \ + not gajim.connections[account].password: passphrase = '' w = dialogs.PassphraseDialog( _('Password Required'),