show a message to user when gnomekeyring is installed but not well started. fixes #2834

This commit is contained in:
Yann Leboulanger 2006-12-28 10:01:15 +00:00
parent 8707d511c1
commit d1c01945be
2 changed files with 7 additions and 3 deletions

View file

@ -21,8 +21,10 @@ from common import gajim
try: try:
import gnomekeyring import gnomekeyring
except ImportError: except ImportError:
USER_HAS_GNOMEKEYRING = False
USER_USES_GNOMEKEYRING = False USER_USES_GNOMEKEYRING = False
else: else:
USER_HAS_GNOMEKEYRING = True
if gnomekeyring.is_available(): if gnomekeyring.is_available():
USER_USES_GNOMEKEYRING = True USER_USES_GNOMEKEYRING = True
else: else:

View file

@ -2669,9 +2669,11 @@ class RosterWindow:
if not gajim.connections[account].password: if not gajim.connections[account].password:
passphrase = '' passphrase = ''
w = dialogs.PassphraseDialog( text = _('Enter your password for account %s') % account
_('Password Required'), if passwords.USER_HAS_GNOMEKEYRING and \
_('Enter your password for account %s') % account, not passwords.USER_USES_GNOMEKEYRING:
text += '\n' + _('Gnomekeyring is installed but not correctly started (environment variable probably not correctly set)')
w = dialogs.PassphraseDialog(_('Password Required'), text,
_('Save password')) _('Save password'))
passphrase, save = w.run() passphrase, save = w.run()
if passphrase == -1: if passphrase == -1: