show notification for bad GPG pass instead of an error dialog
This commit is contained in:
parent
7d7ca4d4ae
commit
0ea6544c26
|
@ -2615,9 +2615,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
|||
if sign_msg and not signed:
|
||||
signed = self.get_signed_presence(msg)
|
||||
if signed is None:
|
||||
self.dispatch('ERROR', (_('OpenPGP passphrase was not given'),
|
||||
#%s is the account name here
|
||||
_('You will be connected to %s without OpenPGP.') % self.name))
|
||||
self.dispatch('BAD_PASSPHRASE', ())
|
||||
self.USE_GPG = False
|
||||
signed = ''
|
||||
self.connected = gajim.SHOW_LIST.index(show)
|
||||
|
|
|
@ -1509,10 +1509,15 @@ class Interface:
|
|||
if use_gpg_agent:
|
||||
sectext = _('You configured Gajim to use GPG agent, but there is no '
|
||||
'GPG agent running or it returned a wrong passphrase.\n')
|
||||
sectext += _('You are currently connected without your OpenPGP key.')
|
||||
sectext += _('You are currently connected without your OpenPGP key.')
|
||||
dialogs.WarningDialog(_('Your passphrase is incorrect'), sectext)
|
||||
else:
|
||||
path = os.path.join(gajim.DATA_DIR, 'pixmaps', 'warning.png')
|
||||
notify.popup('warning', account, account, 'warning', path,
|
||||
_('OpenGPG Passphrase Incorrect'),
|
||||
_('You are currently connected without your OpenPGP key.'))
|
||||
keyID = gajim.config.get_per('accounts', account, 'keyid')
|
||||
self.forget_gpg_passphrase(keyID)
|
||||
dialogs.WarningDialog(_('Your passphrase is incorrect'), sectext)
|
||||
|
||||
def handle_event_gpg_password_required(self, account, array):
|
||||
#('GPG_PASSWORD_REQUIRED', account, (callback,))
|
||||
|
|
Loading…
Reference in New Issue