diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 0cfab7a2b..b4576a455 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -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) diff --git a/src/gajim.py b/src/gajim.py index 377888e96..b8512ac43 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -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,))