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:
parent
febe8d4a1a
commit
e0b1dd77f8
|
@ -1631,6 +1631,7 @@ class Connection:
|
||||||
self.dispatch('ERROR', (_('Could not connect to "%s"') % hostname,
|
self.dispatch('ERROR', (_('Could not connect to "%s"') % hostname,
|
||||||
_('Check your connection or try again later')))
|
_('Check your connection or try again later')))
|
||||||
return None
|
return None
|
||||||
|
self.password = None
|
||||||
if not self.connected: # We went offline during connecting process
|
if not self.connected: # We went offline during connecting process
|
||||||
return None
|
return None
|
||||||
if hasattr(con, 'Resource'):
|
if hasattr(con, 'Resource'):
|
||||||
|
|
|
@ -1312,6 +1312,8 @@ class AccountModificationWindow:
|
||||||
gajim.config.set_per('accounts', name, opt, config[opt])
|
gajim.config.set_per('accounts', name, opt, config[opt])
|
||||||
if config['savepass']:
|
if config['savepass']:
|
||||||
gajim.connections[name].password = config['password']
|
gajim.connections[name].password = config['password']
|
||||||
|
else:
|
||||||
|
gajim.connections[name].password = None
|
||||||
#refresh accounts window
|
#refresh accounts window
|
||||||
if gajim.interface.windows.has_key('accounts'):
|
if gajim.interface.windows.has_key('accounts'):
|
||||||
gajim.interface.windows['accounts'].init_accounts()
|
gajim.interface.windows['accounts'].init_accounts()
|
||||||
|
@ -2660,6 +2662,8 @@ class AccountCreationWizardWindow:
|
||||||
_('You already have an account using this name.')).get_response()
|
_('You already have an account using this name.')).get_response()
|
||||||
return
|
return
|
||||||
con = connection.Connection(self.account)
|
con = connection.Connection(self.account)
|
||||||
|
if savepass:
|
||||||
|
con.password = password
|
||||||
gajim.events_for_ui[self.account] = []
|
gajim.events_for_ui[self.account] = []
|
||||||
if not self.modify:
|
if not self.modify:
|
||||||
con.new_account(self.account, config)
|
con.new_account(self.account, config)
|
||||||
|
|
|
@ -1302,7 +1302,8 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
||||||
self.set_connecting_state(account)
|
self.set_connecting_state(account)
|
||||||
|
|
||||||
save_pass = gajim.config.get_per('accounts', account, 'savepass')
|
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 = ''
|
passphrase = ''
|
||||||
w = dialogs.PassphraseDialog(
|
w = dialogs.PassphraseDialog(
|
||||||
_('Password Required'),
|
_('Password Required'),
|
||||||
|
|
Loading…
Reference in New Issue