diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 0cfab7a2be5125445fd0ce3e5c6766dfd2b7166a..b4576a455a97ad7da8946c4f971793920a8a7d7f 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 377888e96a9ddb5b1729f7a68b89ee893c6f9033..b8512ac43d89bde620ea0198c053fa35471fc392 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,))