Changeset 9981

Show
Ignore:
Timestamp:
07/22/08 16:32:37 (5 weeks ago)
Author:
js
Message:

* End ESession when remote signs off.
* Fix typo.
* Better code in conversation_textview.py.

@bct: Your diff didn't work, I had to move it + add an if. Seems to
work now.

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/conversation_textview.py

    r9959 r9981  
    398398 
    399399        def show_xep0184_warning(self, id): 
    400                 try: 
    401                         if self.xep0184_marks[id] is not None: 
    402                                 return 
    403                 except KeyError: 
    404                         pass 
     400                if self.xep0184_marks.has_key(id): 
     401                        return 
    405402 
    406403                buffer = self.tv.get_buffer() 
     
    428425 
    429426        def hide_xep0184_warning(self, id): 
    430                 try: 
    431                         if self.xep0184_marks[id] is None: 
    432                                 return 
    433                 except KeyError: 
     427                if not self.xep0184_marks.has_key(id): 
    434428                        return 
    435429 
     
    453447                buffer.end_user_action() 
    454448 
    455                 self.xep0184_marks[id] = None 
     449                del self.xep0184_marks[id] 
    456450                del self.xep0184_shown[id] 
    457451 
  • trunk/src/gajim.py

    r9980 r9981  
    774774                                gajim.connections[account]. \ 
    775775                                        remove_transfers_for_contact(contact1) 
     776 
     777                                # disable encryption, since if any messages are 
     778                                # lost they'll be not decryptable (note that 
     779                                # this contradicts XEP-0201 - trying to get the 
     780                                # in the XEP, though) 
     781                                if gajim.connections[account].sessions. \ 
     782                                has_key(ji): 
     783                                        for sess in gajim.connections \ 
     784                                        [account]. sessions[ji].values(): 
     785                                                if sess.enable_encryption: 
     786                                                        sess.terminate_e2e() 
     787                                                        gajim.connections \ 
     788                                                        [account]. \ 
     789                                                        delete_session(jid, 
     790                                                        sess.thread_id) 
     791 
    776792                        self.roster.chg_contact_status(contact1, array[1], 
    777793                                status_message, account) 
     
    787803                        elif old_show > 1 and new_show < 2: 
    788804                                notify.notify('contact_disconnected', jid,  
    789                                         ccount, status_message) 
     805                                        account, status_message) 
    790806                                if self.remote_ctrl: 
    791807                                        self.remote_ctrl.raise_signal(