Author: asterix Date: 2009-01-29 21:16:34 +0100 (Thu, 29 Jan 2009) New Revision: 11043
Modified: trunk/src/chat_control.py trunk/src/common/connection_handlers.py trunk/src/common/stanza_session.py trunk/src/session.py Log: [Dicson] option have moved per account. Fixes #4748
Modified: trunk/src/chat_control.py =================================================================== --- trunk/src/chat_control.py 2009-01-28 16:50:32 UTC (rev 11042) +++ trunk/src/chat_control.py 2009-01-29 20:16:34 UTC (rev 11043) @@ -1622,7 +1622,8 @@ ChatControlBase.print_conversation_line(self, msg, 'status', '', None)
- loggable = gajim.config.get('log_encrypted_sessions') + loggable = gajim.config.get_per('accounts', self.account, + 'log_encrypted_sessions')
if self.session: self.session.loggable = loggable
Modified: trunk/src/common/connection_handlers.py =================================================================== --- trunk/src/common/connection_handlers.py 2009-01-28 16:50:32 UTC (rev 11042) +++ trunk/src/common/connection_handlers.py 2009-01-29 20:16:34 UTC (rev 11043) @@ -1550,7 +1550,7 @@ qp = iq_obj.getTag('query') qp.setTagData('name', 'Gajim') qp.setTagData('version', gajim.version) - send_os = gajim.config.get('send_os_info') + send_os = gajim.config.get_per('accounts', self.name, 'send_os_info') if send_os: qp.setTagData('os', helpers.get_os_info()) self.connection.send(iq_obj)
Modified: trunk/src/common/stanza_session.py =================================================================== --- trunk/src/common/stanza_session.py 2009-01-28 16:50:32 UTC (rev 11042) +++ trunk/src/common/stanza_session.py 2009-01-29 20:16:34 UTC (rev 11043) @@ -246,7 +246,7 @@ return crypto.encode_mpi(gajim.pubkey.sign(hash_, '')[0])
def encrypt_stanza(self, stanza): - encryptable = [x for x in stanza.getChildren() if x.getName() not in + encryptable = [x for x in stanza.getChildren() if x.getName() not in ('error', 'amp', 'thread')]
# FIXME can also encrypt contents of <error/> elements in stanzas @type = @@ -353,7 +353,8 @@ return self.decrypter.decrypt(ciphertext)
def logging_preference(self): - if gajim.config.get('log_encrypted_sessions'): + if gajim.config.get_per('accounts', self.conn.name, + 'log_encrypted_sessions'): return ['may', 'mustnot'] else: return ['mustnot', 'may'] @@ -989,7 +990,7 @@ def fail_bad_negotiation(self, reason, fields=None): ''' Sends an error and cancels everything. - + If fields is None, the remote party has given us a bad cryptographic value of some kind. Otherwise, list the fields we haven't implemented '''
Modified: trunk/src/session.py =================================================================== --- trunk/src/session.py 2009-01-28 16:50:32 UTC (rev 11042) +++ trunk/src/session.py 2009-01-29 20:16:34 UTC (rev 11043) @@ -184,8 +184,9 @@ if not msgtxt: # empty message text return
- if gajim.config.get('ignore_unknown_contacts') and \ - not gajim.contacts.get_contacts(self.conn.name, jid) and not pm: + if gajim.config.get_per('accounts', self.conn.name, + 'ignore_unknown_contacts') and not gajim.contacts.get_contacts( + self.conn.name, jid) and not pm: return
if not contact: