Changeset 9970

Show
Ignore:
Timestamp:
07/20/08 17:06:21 (6 weeks ago)
Author:
bct
Message:

make esession autonegotiation option per-account and per-jid

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/chat_control.py

    r9964 r9970  
    11361136                gpg_pref = gajim.config.get_per('contacts', contact.jid, 
    11371137                        'gpg_enabled') 
     1138                e2e_pref = gajim.config.get_per('accounts', self.account, 
     1139                        'autonegotiate_esessions') and gajim.config.get_per('contacts', 
     1140                        contact.jid, 'autonegotiate_esessions') 
    11381141 
    11391142                # try GPG first 
     
    11561159                # then try E2E 
    11571160                # XXX: Once we have fallback to disco, remove notexistant check 
    1158                 elif not e2e_is_active and gajim.HAVE_PYCRYPTO \ 
    1159                 and gajim.config.get('autonegotiate_esessions') \ 
     1161                elif not e2e_is_active and gajim.HAVE_PYCRYPTO and e2e_pref \ 
    11601162                and gajim.capscache.is_supported(contact, NS_ESESSION) \ 
    11611163                and not gajim.capscache.is_supported(contact, 'notexistant'): 
  • trunk/src/common/config.py

    r9964 r9970  
    192192                'tabs_close_button': [opt_bool, True, _('Show close button in tab?')], 
    193193                'log_encrypted_sessions': [opt_bool, True, _('When negotiating an encrypted session, should Gajim assume you want your messages to be logged?')], 
    194                 'autonegotiate_esessions': [opt_bool, True, _('Should Gajim automatically start an encrypted session when possible?')], 
    195194                'esession_modp': [opt_str, '5,14', _('A list of modp groups to use in a Diffie-Hellman, highest preference first, separated by commas. Valid groups are 1, 2, 5, 14, 15, 16, 17 and 18. Higher numbers are more secure, but take longer to calculate when you start a session.')], 
    196195                'chat_avatar_width': [opt_int, 52], 
     
    278277                        'gpg_sign_presence': [ opt_bool, True, _('If disabled, don\'t sign presences with GPG key, even if GPG is configured.') ], 
    279278                        'keyname': [ opt_str, '', '', True ], 
     279                        'autonegotiate_esessions': [opt_bool, True, _('Should Gajim automatically start an encrypted session when possible?')], 
    280280                        'connection_types': [ opt_str, 'tls ssl plain', _('Ordered list (space separated) of connection type to try. Can contain tls, ssl or plain')], 
    281281                        'warn_when_plaintext_connection': [ opt_bool, True, _('Show a warning dialog before sending password on an plaintext connection.') ], 
     
    300300                        'dont_ack_subscription': [opt_bool, False, _('Jabberd2 workaround')], 
    301301                        # proxy65 for FT 
    302                         'file_transfer_proxies': [opt_str,  
     302                        'file_transfer_proxies': [opt_str, 
    303303                        'proxy.jabber.org, proxy.netlab.cz, transfer.jabber.freenet.de, proxy.jabber.cd.chalmers.se'], 
    304304                        'use_ft_proxies': [opt_bool, True, _('If checked, Gajim will use your IP and proxies defined in file_transfer_proxies option for file transfer.'), True], 
     
    362362                        'bannerfont': [ opt_str, '', '', True ], 
    363363                        'bannerfontattrs': [ opt_str, 'B', '', True ], 
    364                                  
     364 
    365365                        # http://www.pitt.edu/~nisg/cis/web/cgi/rgb.html 
    366366                        'state_inactive_color': [ opt_color, 'grey62' ], 
     
    375375                'contacts': ({ 
    376376                        'gpg_enabled': [ opt_bool, False, _('Is OpenPGP enabled for this contact?')], 
     377                        'autonegotiate_esessions': [opt_bool, True, _('Should Gajim automatically start an encrypted session with this contact when possible?')], 
    377378                        'speller_language': [ opt_str, '', _('Language for which we want to check misspelled words')], 
    378379                }, {}),