Show
Ignore:
Timestamp:
05/04/08 02:24:27 (4 months ago)
Author:
bct
Message:

pm bugfix

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/session_centric/src/message_window.py

    r9556 r9569  
    430430                fjid = ctrl.get_full_jid() 
    431431                thread_id = ctrl.session.thread_id 
     432 
    432433                del self._controls[ctrl.account][fjid][thread_id] 
    433434 
     
    568569 
    569570        def change_key(self, old_jid, new_jid, acct): 
    570                 '''Change the key of a control''' 
     571                '''Change the JID key of a control''' 
    571572                try: 
    572                         # Check if control exists 
    573                         ctrl = self._controls[acct][old_jid] 
    574                 except: 
     573                        # Check if controls exists 
     574                        ctrls = self._controls[acct][old_jid] 
     575                except KeyError: 
    575576                        return 
    576                 self._controls[acct][new_jid] = self._controls[acct][old_jid] 
     577                self._controls[acct][new_jid] = ctrls 
    577578                del self._controls[acct][old_jid] 
    578579                if old_jid in gajim.last_message_time[acct]: 
     
    580581                                gajim.last_message_time[acct][old_jid] 
    581582                        del gajim.last_message_time[acct][old_jid] 
     583 
     584        def change_thread_key(self, jid, acct, old_thread_id, new_thread_id): 
     585                '''Change the thread_id key of a control''' 
     586                try: 
     587                        # Check if control exists 
     588                        ctrl = self._controls[acct][jid][old_thread_id] 
     589                except KeyError: 
     590                        return 
     591 
     592                self._controls[acct][jid][new_thread_id] = ctrl 
     593                del self._controls[acct][jid][old_thread_id] 
    582594 
    583595        def controls(self):