add an ACE option to disable the use of Gnome Keyring. fixes #2835

This commit is contained in:
Yann Leboulanger 2006-12-29 18:30:18 +00:00
parent 9284e84f3e
commit 77d9f89eee
2 changed files with 13 additions and 10 deletions

View File

@ -221,6 +221,7 @@ class Config:
'ctrl_tab_go_to_next_composing': [opt_bool, True, _('Ctrl-Tab go to next composing tab when none is unread.')],
'confirm_metacontacts': [ opt_str, '', _('Should we show the confirm metacontacts creation dialog or not? Empty string means we never show the dialog.')],
'enable_negative_priority': [ opt_bool, False, _('If True, you will be able to set a negative priority to your account in account modification window. BE CAREFULL, when you are logged in with a negative priority, you will NOT receive any message from your server.')],
'use_gnomekeyring': [opt_bool, True, _('If True, Gajim will use Gnome Keyring (if available) to store account passwords.')],
}
__options_per_key = {

View File

@ -18,17 +18,19 @@ import gobject
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
USER_HAS_GNOMEKEYRING = False
USER_USES_GNOMEKEYRING = False
if gajim.config.get('use_gnomekeyring'):
try:
import gnomekeyring
except ImportError:
pass
else:
USER_USES_GNOMEKEYRING = False
USER_HAS_GNOMEKEYRING = True
if gnomekeyring.is_available():
USER_USES_GNOMEKEYRING = True
else:
USER_USES_GNOMEKEYRING = False
class PasswordStorage(object):
def get_password(self, account_name):