Author: asterix Date: 2006-12-29 19:30:18 +0100 (Fri, 29 Dec 2006) New Revision: 7738
Modified: trunk/src/common/config.py trunk/src/common/passwords.py Log: add an ACE option to disable the use of Gnome Keyring. fixes #2835
Modified: trunk/src/common/config.py =================================================================== --- trunk/src/common/config.py 2006-12-29 17:41:13 UTC (rev 7737) +++ trunk/src/common/config.py 2006-12-29 18:30:18 UTC (rev 7738) @@ -221,6 +221,7 @@ '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 = {
Modified: trunk/src/common/passwords.py =================================================================== --- trunk/src/common/passwords.py 2006-12-29 17:41:13 UTC (rev 7737) +++ trunk/src/common/passwords.py 2006-12-29 18:30:18 UTC (rev 7738) @@ -18,17 +18,19 @@
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):