forbid to rename an account to an already existing name. Fixes #1835
This commit is contained in:
parent
c22929a805
commit
a003eca56f
|
@ -1125,6 +1125,11 @@ class AccountModificationWindow:
|
||||||
_('To change the account name, you must read all pending '
|
_('To change the account name, you must read all pending '
|
||||||
'events.'))
|
'events.'))
|
||||||
return
|
return
|
||||||
|
if name in gajim.connections:
|
||||||
|
dialogs.ErrorDialog(_('Account Name Already Used'),
|
||||||
|
_('This name is already used by another of your accounts. Please choose '
|
||||||
|
'another name.'))
|
||||||
|
return
|
||||||
if (name == ''):
|
if (name == ''):
|
||||||
dialogs.ErrorDialog(_('Invalid account name'),
|
dialogs.ErrorDialog(_('Invalid account name'),
|
||||||
_('Account name cannot be empty.'))
|
_('Account name cannot be empty.'))
|
||||||
|
|
Loading…
Reference in New Issue