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:
import gnomekeyring
except ImportError:
USER_HAS_GNOMEKEYRING = False
USER_USES_GNOMEKEYRING = False
else:
USER_HAS_GNOMEKEYRING = True
if gnomekeyring.is_available():
USER_USES_GNOMEKEYRING = True
else:

View File

@ -2669,9 +2669,11 @@ class RosterWindow:
if not gajim.connections[account].password:
passphrase = ''
w = dialogs.PassphraseDialog(
_('Password Required'),
_('Enter your password for account %s') % account,
text = _('Enter your password for account %s') % account
if passwords.USER_HAS_GNOMEKEYRING and \
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'))
passphrase, save = w.run()
if passphrase == -1: