at the end of the account creatio we don't need to enter the password if we entered it in the paramteres (even is save pass is not checked)

This commit is contained in:
Yann Leboulanger 2005-11-05 11:21:41 +00:00
parent febe8d4a1a
commit e0b1dd77f8
3 changed files with 7 additions and 1 deletions

View File

@ -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'):

View File

@ -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)

View File

@ -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'),