diff --git a/src/common/connection.py b/src/common/connection.py index 55d6d6627c1d8cad809c38550a3c96d5e71c73fd..aeeae5ee6a34aa5d089867976ac347c26390cff8 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -767,7 +767,7 @@ class Connection(ConnectionHandlers): safe_substitute({ 'hostname': socket.gethostname() }) - if USE_GPG and not self.gpg: + if USE_GPG: self.gpg = GnuPG.GnuPG(gajim.config.get('use_gpg_agent')) self.connect_and_init(show, msg, sign_msg) diff --git a/src/gajim.py b/src/gajim.py index 6ca85d45470e47c7b3dc1cf91d30c7f413797db4..fa8c4e88c62c8c5c35b3db0e9ed98441bba20cd1 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -1371,13 +1371,16 @@ class Interface: return False def handle_event_bad_passphrase(self, account, array): + #('BAD_PASSPHRASE', account, ()) use_gpg_agent = gajim.config.get('use_gpg_agent') + sectext = '' if use_gpg_agent: - return + 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.') keyID = gajim.config.get_per('accounts', account, 'keyid') self.forget_gpg_passphrase(keyID) - dialogs.WarningDialog(_('Your passphrase is incorrect'), - _('You are currently connected without your OpenPGP key.')) + dialogs.WarningDialog(_('Your passphrase is incorrect'), sectext) def handle_event_gpg_password_required(self, account, array): #('GPG_PASSWORD_REQUIRED', account, (callback,))