Show
Ignore:
Timestamp:
01/06/07 12:00:50 (2 years ago)
Author:
asterix
Message:

merge changeset from trunk except pyopenssl stuff

Location:
branches/gajim_0.11/src
Files:
29 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11/src/chat_control.py

    r7645 r7787  
    5050#LANG=$(for i in *.po; do  j=${i/.po/}; echo -n "_('"$j"')":" '"$j"', " ; done) 
    5151#echo "{_('en'):'en'",$LANG"}" 
    52 langs = {_('English'): 'en', _('Bulgarian'): 'bg', _('Briton'): 'br', _('Czech'): 'cs', _('German'): 'de', _('Greek'): 'el', _('Esperanto'): 'eo', _('Spanish'): 'es', _('Basc'): 'eu', _('French'): 'fr', _('Croatian'): 'hr', _('Italian'): 'it', _('Norvegian b'): 'nb', _('Dutch'): 'nl', _('Norvegian'): 'no', _('Polish'): 'pl', _('Portuguese'): 'pt', _('Brazilian Portuguese'): 'pt_BR', _('Russian'): 'ru', _('Slovak'): 'sk', _('Swedish'): 'sv', _('Chinese (Ch)'): 'zh_CN'} 
     52langs = {_('English'): 'en', _('Belarusian'): 'be', _('Bulgarian'): 'bg', _('Briton'): 'br', _('Czech'): 'cs', _('German'): 'de', _('Greek'): 'el', _('British'): 'en_GB', _('Esperanto'): 'eo', _('Spanish'): 'es', _('Basc'): 'eu', _('French'): 'fr', _('Croatian'): 'hr', _('Italian'): 'it', _('Norwegian (b)'): 'nb', _('Dutch'): 'nl', _('Norwegian'): 'no', _('Polish'): 'pl', _('Portuguese'): 'pt', _('Brazilian Portuguese'): 'pt_BR', _('Russian'): 'ru', _('Slovak'): 'sk', _('Swedish'): 'sv', _('Chinese (Ch)'): 'zh_CN'} 
    5353 
    5454 
  • branches/gajim_0.11/src/common/check_paths.py

    r7208 r7787  
    8787        dot_gajim = os.path.dirname(VCARD_PATH) 
    8888        if os.path.isfile(dot_gajim): 
    89                 print _('%s is file but it should be a directory') % dot_gajim 
     89                print _('%s is a file but it should be a directory') % dot_gajim 
    9090                print _('Gajim will now exit') 
    9191                sys.exit() 
     
    9898                        create_path(VCARD_PATH) 
    9999                elif os.path.isfile(VCARD_PATH): 
    100                         print _('%s is file but it should be a directory') % VCARD_PATH 
     100                        print _('%s is a file but it should be a directory') % VCARD_PATH 
    101101                        print _('Gajim will now exit') 
    102102                        sys.exit() 
     
    105105                        create_path(AVATAR_PATH) 
    106106                elif os.path.isfile(AVATAR_PATH): 
    107                         print _('%s is file but it should be a directory') % AVATAR_PATH 
     107                        print _('%s is a file but it should be a directory') % AVATAR_PATH 
    108108                        print _('Gajim will now exit') 
    109109                        sys.exit() 
     
    113113                        gajim.logger.init_vars() 
    114114                elif os.path.isdir(LOG_DB_PATH): 
    115                         print _('%s is directory but should be file') % LOG_DB_PATH 
     115                        print _('%s is a directory but should be a file') % LOG_DB_PATH 
    116116                        print _('Gajim will now exit') 
    117117                        sys.exit() 
  • branches/gajim_0.11/src/common/configpaths.py

    r7510 r7787  
    4242                                except KeyError: 
    4343                                        # win9x, in cwd 
    44                                         self.root = u'' 
     44                                        self.root = u'.' 
    4545                        else: # Unices 
    4646                                # Pass in an Unicode string, and hopefully get one back. 
     
    8888 
    8989        paths.add('DATA', os.path.join(u'..', windowsify(u'data'))) 
    90         paths.add('HOME', os.path.expanduser(u'~')) 
     90        paths.add('HOME', fse(os.path.expanduser('~'))) 
    9191        paths.add('TMP', fse(tempfile.gettempdir())) 
    9292 
     
    9797                pass 
    9898 
    99         #for k, v in paths.iteritems(): 
    100         #       print "%s: %s" % (k, v) 
     99        # for k, v in paths.iteritems(): 
     100        #       print "%s: %s" % (repr(k), repr(v)) 
    101101 
    102102        return paths 
     
    114114        paths.add_from_root('CONFIG_FILE', conffile) 
    115115        paths.add_from_root('PID_FILE', pidfile) 
     116 
     117        # for k, v in paths.iteritems(): 
     118        #       print "%s: %s" % (repr(k), repr(v)) 
  • branches/gajim_0.11/src/common/config.py

    r7582 r7787  
    3939opt_color = [ 'color', '^(#[0-9a-fA-F]{6})|()$' ] 
    4040opt_one_window_types = ['never', 'always', 'peracct', 'pertype'] 
     41opt_treat_incoming_messages = ['', 'chat', 'normal'] 
    4142 
    4243class Config: 
     
    9091                'speller_language': [ opt_str, '', _('Language used by speller')], 
    9192                'print_time': [ opt_str, 'always',  _('\'always\' - print time for every message.\n\'sometimes\' - print time every print_ichat_every_foo_minutes minute.\n\'never\' - never print time.')], 
    92                 'print_time_fuzzy': [ opt_int, 0, _('Print time in chats using Fuzzy Clock. Value of fuzziness from 1 to 4, or 0 to disable fuzzyclock. 1 is the most precise clock, 4 the less precise one. This is used only if print_time is \'sometimes\'.') ], 
     93                'print_time_fuzzy': [ opt_int, 0, _('Print time in chats using Fuzzy Clock. Value of fuzziness from 1 to 4, or 0 to disable fuzzyclock. 1 is the most precise clock, 4 the least precise one. This is used only if print_time is \'sometimes\'.') ], 
    9394                'emoticons_theme': [opt_str, 'static', '', True ], 
    9495                'ascii_formatting': [ opt_bool, True, 
     
    189190                'muc_highlight_words': [opt_str, '', _('A semicolon-separated list of words that will be highlighted in group chats.')], 
    190191                'quit_on_roster_x_button': [opt_bool, False, _('If True, quits Gajim when X button of Window Manager is clicked. This setting is taken into account only if trayicon is used.')], 
    191                 'set_xmpp://_handler_everytime': [opt_bool, False, _('If True, Gajim registers for xmpp:// on each startup.')], 
     192                'check_if_gajim_is_default': [opt_bool, True, _('If True, Gajim will check if it\'s the default jabber client on each startup.')], 
    192193                'show_unread_tab_icon': [opt_bool, False, _('If True, Gajim will display an icon on each tab containing unread messages. Depending on the theme, this icon may be animated.')], 
    193194                'show_status_msgs_in_roster': [opt_bool, True, _('If True, Gajim will display the status message, if not empty, for every contact under the contact name in roster window.'), True], 
     
    195196                'ask_avatars_on_startup': [opt_bool, True, _('If True, Gajim will ask for avatar each contact that did not have an avatar last time or has one cached that is too old.')], 
    196197                'print_status_in_chats': [opt_bool, True, _('If False, Gajim will no longer print status line in chats when a contact changes his or her status and/or his or her status message.')], 
    197                 'print_status_in_muc': [opt_str, 'in_and_out', _('can be "none", "all" or "in_and_out". If "none", Gajim will no longer print status line in groupchats when a member changes his or her status and/or his or her status message. If "all" Gajim will print all status messages. If "in_and_out", gajim will only print FOO enters/leaves group chat.')], 
     198                'print_status_in_muc': [opt_str, 'in_and_out', _('can be "none", "all" or "in_and_out". If "none", Gajim will no longer print status line in groupchats when a member changes his or her status and/or his or her status message. If "all" Gajim will print all status messages. If "in_and_out", Gajim will only print FOO enters/leaves group chat.')], 
    198199                'log_contact_status_changes': [opt_bool, False], 
    199200                'just_connected_bg_color': [opt_str, '#adc3c6', _('Background color of contacts when they just signed in.')], 
     
    217218                'hide_groupchat_occupants_list': [opt_bool, False, _('Hides the group chat occupants list in group chat window.')], 
    218219                'chat_merge_consecutive_nickname': [opt_bool, False, _('In a chat, show the nickname at the beginning of a line only when it\'s not the same person talking than in previous message.')], 
    219                 'chat_merge_consecutive_nickname_indent': [opt_str, '  ', _('Indentation when using merge consecutive nickame.')], 
     220                'chat_merge_consecutive_nickname_indent': [opt_str, '  ', _('Indentation when using merge consecutive nickname.')], 
    220221                'gc_nicknames_colors': [ opt_str, '#a34526:#c000ff:#0012ff:#388a99:#045723:#7c7c7c:#ff8a00:#94452d:#244b5a:#32645a', _('List of colors that will be used to color nicknames in group chats.'), True ], 
    221222                'ctrl_tab_go_to_next_composing': [opt_bool, True, _('Ctrl-Tab go to next composing tab when none is unread.')], 
    222223                'confirm_metacontacts': [ opt_str, '', _('Should we show the confirm metacontacts creation dialog or not? Empty string means we never show the dialog.')], 
    223                 '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.')], 
     224                '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 CAREFUL, when you are logged in with a negative priority, you will NOT receive any message from your server.')], 
     225                'use_gnomekeyring': [opt_bool, True, _('If True, Gajim will use Gnome Keyring (if available) to store account passwords.')], 
     226                'show_contacts_number': [opt_bool, True, _('If True, Gajim will show number of online and total contacts in account and group rows.')], 
     227                'treat_incoming_messages': [ opt_str, '', _('Can be empty, \'chat\' or \'normal\'. If not empty, treat all incoming messages as if they were of this type')], 
    224228        } 
    225229 
  • branches/gajim_0.11/src/common/connection_handlers.py

    r7591 r7787  
    2525import sys 
    2626 
    27 from time import localtime, strftime, gmtime 
     27from time import localtime, strftime, gmtime, timezone 
    2828from calendar import timegm 
    2929 
     
    13151315                raise common.xmpp.NodeProcessed 
    13161316 
    1317          
     1317        def _TimeRevisedCB(self, con, iq_obj): 
     1318                gajim.log.debug('TimeRevisedCB') 
     1319                iq_obj = iq_obj.buildReply('result') 
     1320                qp = iq_obj.setTag('time') 
     1321                qp.setTagData('utc', strftime("%Y-%m-%dT%TZ", gmtime())) 
     1322                qp.setTagData('tzo', "%+03d:00"% (time.timezone/(60*60))) 
     1323                self.connection.send(iq_obj) 
     1324                raise common.xmpp.NodeProcessed 
     1325 
    13181326        def _gMailNewMailCB(self, con, gm): 
    13191327                '''Called when we get notified of new mail messages in gmail account''' 
     
    14391447                        self.dispatch('MSGERROR', (frm, msg.getErrorCode(), error_msg, msgtxt, 
    14401448                                tim)) 
     1449                        return 
    14411450                elif mtype == 'groupchat': 
    14421451                        has_timestamp = False 
     
    14521461                                        return 
    14531462                                self.dispatch('GC_MSG', (frm, msgtxt, tim, has_timestamp, msghtml)) 
    1454                                 if self.name not in no_log_for and not int(float(time.mktime(tim))) <= \ 
    1455                                         self.last_history_line[jid] and msgtxt: 
     1463                                if self.name not in no_log_for and not int(float(time.mktime(tim)))\ 
     1464                                <= self.last_history_line[jid] and msgtxt: 
    14561465                                        gajim.logger.write('gc_msg', frm, msgtxt, tim = tim) 
     1466                        return 
    14571467                elif mtype == 'chat': # it's type 'chat' 
    14581468                        if not msg.getTag('body') and chatstate is None: #no <body> 
     
    14621472                                msg_id = gajim.logger.write('chat_msg_recv', frm, msgtxt, tim = tim, 
    14631473                                        subject = subject) 
    1464                         self.dispatch('MSG', (frm, msgtxt, tim, encrypted, mtype, subject, 
    1465                                                 chatstate, msg_id, composing_jep, user_nick, msghtml)) 
    14661474                else: # it's single message 
    14671475                        if invite is not None: 
     
    14761484                                gajim.logger.write('single_msg_recv', frm, msgtxt, tim = tim, 
    14771485                                        subject = subject) 
    1478                         self.dispatch('MSG', (frm, msgtxt, tim, encrypted, 'normal', 
    1479                                 subject, chatstate, msg_id, composing_jep, user_nick, msghtml)) 
     1486                        mtype = 'normal' 
     1487                treat_as = gajim.config.get('treat_incoming_messages') 
     1488                if treat_as: 
     1489                        mtype = treat_as 
     1490                self.dispatch('MSG', (frm, msgtxt, tim, encrypted, mtype, 
     1491                        subject, chatstate, msg_id, composing_jep, user_nick, msghtml)) 
    14801492        # END messageCB 
    14811493 
     
    19631975                con.RegisterHandler('iq', self._TimeCB, 'get', 
    19641976                        common.xmpp.NS_TIME) 
     1977                con.RegisterHandler('iq', self._TimeRevisedCB, 'get', 
     1978                        common.xmpp.NS_TIME_REVISED) 
    19651979                con.RegisterHandler('iq', self._LastCB, 'get', 
    19661980                        common.xmpp.NS_LAST) 
  • branches/gajim_0.11/src/common/contacts.py

    r7516 r7787  
    265265                                        continue 
    266266                                if common.gajim.jid_is_transport(jid) and not \ 
    267                                 common.gajim.config.get('show_transports_group'): 
     267                                        _('Transports') in groups: 
    268268                                        # do not count transports 
    269269                                        continue 
    270270                                contact = self.get_contact_with_highest_priority(account, jid) 
     271                                if _('Not in roster') in contact.groups: 
     272                                        continue 
    271273                                in_groups = False 
    272274                                if groups == []: 
  • branches/gajim_0.11/src/common/fuzzyclock.py

    r6482 r7787  
    4545 
    4646        #Strings to use for the output. %0 will be replaced with the preceding hour (e.g. "x PAST %0"), %1 with the coming hour (e.g. "x TO %1). ''' 
    47         self.__normalFuzzy = [ _("%0 o'clock"), _('five past %0'), _('ten past %0'), 
    48                                _('quarter past %0'), _('twenty past %0'), 
    49                                _('twenty five past %0'), _('half past %0'), 
    50                                _('twenty five to %1'), _('twenty to %1'), 
    51                                _('quarter to %1'), _('ten to %1'), _('five to %1'), 
    52                                _("%1 o'clock") ] 
     47        self.__normalFuzzy = [ _("$0 o'clock"), _('five past $0'), 
     48                                                                                _('ten past $0'), _('quarter past $0'), 
     49                                                                                _('twenty past $0'), _('twenty five past $0'), 
     50                                                                                _('half past $0'), _('twenty five to $1'), 
     51                                                                                _('twenty to $1'), _('quarter to $1'), 
     52                                                                                _('ten to $1'), _('five to $1'), _("$1 o'clock") ] 
    5353 
    5454        #A "singular-form". It is used when talking about hour 0 
    55         self.__normalFuzzyOne = [ _("%0 o'clock"), _('five past %0'), 
    56                                   _('ten past %0'), _('quarter past %0'), 
    57                                   _('twenty past %0'), _('twenty five past %0'), 
    58                                   _('half past %0'), _('twenty five to %1'), 
    59                                   _('twenty to %1'), _('quarter to %1'), 
    60                                   _('ten to %1'), _('five to %1'), _("%1 o'clock") ] 
     55        self.__normalFuzzyOne = [ _("$0 o'clock"), _('five past $0'), 
     56                                  _('ten past $0'), _('quarter past $0'), 
     57                                  _('twenty past $0'), _('twenty five past $0'), 
     58                                  _('half past $0'), _('twenty five to $1'), 
     59                                  _('twenty to $1'), _('quarter to $1'), 
     60                                  _('ten to $1'), _('five to $1'), 
     61                                                                                         _("$1 o'clock") ] 
     62 
    6163 
    6264        self.__dayTime = [ _('Night'), _('Early morning'), _('Morning'), _('Almost noon'), 
     
    103105 
    104106            newTimeStr = self.__normalFuzzy[sector] 
    105             #%0 or %1? 
    106             deltaHour = int(newTimeStr[newTimeStr.find("%")+1]) 
     107            #$0 or $1? 
     108            deltaHour = int(newTimeStr[newTimeStr.find("$")+1]) 
    107109 
    108110            if (self.__hour + deltaHour) % 12 > 0: 
     
    114116                newTimeStr = self.__normalFuzzyOne[sector] 
    115117 
    116             newTimeStr = newTimeStr.replace("%"+str(deltaHour), 
     118            newTimeStr = newTimeStr.replace("$"+str(deltaHour), 
    117119                                            self.__hourNames[realHour]) 
    118120 
  • branches/gajim_0.11/src/common/gajim.py

    r7542 r7787  
    121121status_before_autoaway = {} 
    122122 
     123# jid of transport contacts for which we need to ask avatar when transport will 
     124# be online 
     125transport_avatar = {} # {transport_jid: [jid_list]} 
     126 
    123127SHOW_LIST = ['offline', 'connecting', 'online', 'chat', 'away', 'xa', 'dnd', 
    124128        'invisible'] 
  • branches/gajim_0.11/src/common/helpers.py

    r7562 r7787  
    350350                return _('is composing a message...') 
    351351        elif chatstate == 'paused': 
    352                 #paused means he or she was compoing but has stopped for a while 
     352                #paused means he or she was composing but has stopped for a while 
    353353                return _('paused composing a message') 
    354354        elif chatstate == 'gone': 
  • branches/gajim_0.11/src/common/idle.c

    r4700 r7787  
    66 * Copyright (C) 2003-2004 Yann Le Boulanger <asterix@lagaule.org> 
    77 *                         Vincent Hanquez <tab@snarc.org> 
    8  * Copyright (C) 2005 Yann Le Boulanger <asterix@lagaule.org> 
    9  *                    Vincent Hanquez <tab@snarc.org> 
     8 * Copyright (C) 2005-2006 Yann Le Boulanger <asterix@lagaule.org> 
    109 *                    Nikos Kouremenos <nkour@jabber.org> 
    11  *                    Dimitur Kirov <dkirov@gmail.com> 
    12  *                    Travis Shirk <travis@pobox.com> 
    13  *                    Norman Rasmussen <norman@rasmussen.co.za> 
    1410 * 
    1511 * This program is free software; you can redistribute it and/or modify 
     
    2723        #include <X11/Xutil.h> 
    2824        #include <X11/extensions/scrnsaver.h> 
    29 #else 
    30         #define _WIN32_WINNT 0x0500 
    31         #include <windows.h> 
    32         #define EXPORT __declspec(dllexport) 
    3325#endif 
    3426 
    3527#include <Python.h> 
    3628 
    37 #ifdef _WIN32 
    38         typedef BOOL (WINAPI *GETLASTINPUTINFO)(LASTINPUTINFO *); 
    39         static HMODULE g_user32 = NULL; 
    40         static GETLASTINPUTINFO g_GetLastInputInfo = NULL; 
    41 #else 
     29#ifndef _WIN32 
    4230        Display *display; 
    4331#endif 
     
    4836#ifndef _WIN32 
    4937        display = XOpenDisplay(NULL); 
    50 #else 
    51         g_user32 = LoadLibrary("user32.dll"); 
    52         if (g_user32) { 
    53                 g_GetLastInputInfo = (GETLASTINPUTINFO)GetProcAddress(g_user32, "GetLastInputInfo"); 
    54         } 
    5538#endif 
    5639        Py_INCREF(Py_None); 
     
    6346        static XScreenSaverInfo *mit_info = NULL; 
    6447        int idle_time, event_base, error_base; 
    65 #else 
    66         int idle_time = 0; 
    6748#endif 
    6849 
     
    7758        else 
    7859                idle_time = 0; 
    79 #else 
    80         if (g_GetLastInputInfo != NULL) { 
    81                 LASTINPUTINFO lii; 
    82                 memset(&lii, 0, sizeof(lii)); 
    83                 lii.cbSize = sizeof(lii); 
    84                 if (g_GetLastInputInfo(&lii)) { 
    85                         idle_time = lii.dwTime; 
    86                 } 
    87                 idle_time = (GetTickCount() - idle_time) / 1000; 
    88         }                                                                        
    8960#endif 
    9061        return Py_BuildValue("i", idle_time); 
     
    9566#ifndef _WIN32 
    9667        XCloseDisplay(display); 
    97 #else 
    98         if (g_user32 != NULL) 
    99                 FreeLibrary(g_user32); 
    10068#endif 
    10169        Py_INCREF(Py_None); 
  • branches/gajim_0.11/src/common/logger.py

    r7613 r7787  
    3232import configpaths 
    3333LOG_DB_PATH = configpaths.gajimpaths['LOG_DB'] 
     34LOG_DB_FOLDER, LOG_DB_FILE = os.path.split(LOG_DB_PATH) 
    3435 
    3536class Constants: 
     
    9899                self.close_db() 
    99100 
     101                # FIXME: sqlite3_open wants UTF8 strings. So a path with 
     102                # non-ascii chars doesn't work. See #2812 and 
     103                # http://lists.initd.org/pipermail/pysqlite/2005-August/000134.html 
     104                back = os.getcwd() 
     105                os.chdir(LOG_DB_FOLDER) 
     106 
    100107                # if locked, wait up to 20 sec to unlock 
    101108                # before raise (hopefully should be enough) 
    102                 self.con = sqlite.connect(LOG_DB_PATH, timeout = 20.0, 
     109 
     110                self.con = sqlite.connect(LOG_DB_FILE, timeout = 20.0, 
    103111                        isolation_level = 'IMMEDIATE') 
     112                os.chdir(back) 
    104113                self.cur = self.con.cursor() 
    105114                self.set_synchronous(False) 
  • branches/gajim_0.11/src/common/optparser.py

    r7537 r7787  
    9999        def write(self): 
    100100                (base_dir, filename) = os.path.split(self.__filename) 
    101                 try: 
    102                         base_dir = base_dir.decode(sys.getfilesystemencoding()) 
    103                         filename = filename.decode(sys.getfilesystemencoding()) 
    104                 except: 
    105                         pass 
    106101                self.__tempfile = os.path.join(base_dir, '.' + filename) 
    107102                try: 
     
    212207        def assert_unread_msgs_table_exists(self): 
    213208                '''create table unread_messages if there is no such table''' 
    214                 con = sqlite.connect(logger.LOG_DB_PATH)  
     209                #FIXME see #2812 
     210                back = os.getcwd() 
     211                os.chdir(logger.LOG_DB_FOLDER) 
     212                con = sqlite.connect(logger.LOG_DB_FILE) 
     213                os.chdir(back) 
    215214                cur = con.cursor() 
    216215                try: 
     
    281280        def update_config_to_01013(self): 
    282281                '''create table transports_cache if there is no such table''' 
    283                 con = sqlite.connect(logger.LOG_DB_PATH)  
     282                #FIXME see #2812 
     283                back = os.getcwd() 
     284                os.chdir(logger.LOG_DB_FOLDER) 
     285                con = sqlite.connect(logger.LOG_DB_FILE) 
     286                os.chdir(back) 
    284287                cur = con.cursor() 
    285288                try: 
     
    300303        def update_config_to_01014(self): 
    301304                '''apply indeces to the logs database''' 
    302                 print _('migrating logs database to indeces') 
    303                 con = sqlite.connect(logger.LOG_DB_PATH)  
     305                print _('migrating logs database to indices') 
     306                #FIXME see #2812 
     307                back = os.getcwd() 
     308                os.chdir(logger.LOG_DB_FOLDER) 
     309                con = sqlite.connect(logger.LOG_DB_FILE) 
     310                os.chdir(back) 
    304311                cur = con.cursor() 
    305312                # apply indeces 
     
    320327        def update_config_to_01015(self): 
    321328                '''clean show values in logs database''' 
    322                 con = sqlite.connect(logger.LOG_DB_PATH) 
     329                #FIXME see #2812 
     330                back = os.getcwd() 
     331                os.chdir(logger.LOG_DB_FOLDER) 
     332                con = sqlite.connect(logger.LOG_DB_FILE) 
     333                os.chdir(back) 
    323334                cur = con.cursor() 
    324335                status = dict((i[5:].lower(), logger.constants.__dict__[i]) for i in \ 
  • branches/gajim_0.11/src/common/passwords.py

    </
    r7321 r7787  
    1919from common import gajim 
    2020 
    21 try: 
    22         import gnomekeyring 
    23 except ImportError: 
    24         USER_USES_GNOMEKEYRING = False 
    25 else: 
    26         if gnomekeyring.is_available(): 
    27                 USER_USES_GNOMEKEYRING = True 
     21USER_HAS_GNOMEKEYRING = False 
     22USER_USES_GNOMEKEYRING = False 
     23if gajim.config.get('use_gnomekeyring'): 
     24        try: 
     25                import gnomekeyring 
     26        except ImportError: 
     27                pass