Changeset 9628

Show
Ignore:
Timestamp:
05/13/08 14:51:35 (2 months ago)
Author:
bct
Message:

fixed bt when closing tab when multiple tabs with a JID are open

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/message_window.py

    r9625 r9628  
    441441                gajim.events.remove_events(ctrl.account, ctrl.get_full_jid, 
    442442                        types = ['printed_msg', 'chat', 'gc_msg']) 
    443                 del gajim.last_message_time[ctrl.account][ctrl.get_full_jid()] 
     443 
     444                fjid = ctrl.get_full_jid() 
     445                jid = gajim.get_jid_without_resource(fjid) 
     446                thread_id = ctrl.session.thread_id 
     447 
     448                fctrls = self.get_controls(fjid, ctrl.account) 
     449                bctrls = self.get_controls(jid, ctrl.account) 
     450                # keep last_message_time around unless this was our last control with 
     451                # that jid 
     452                if not fctrls and not bctrls: 
     453                        del gajim.last_message_time[ctrl.account][fjid] 
    444454 
    445455                # Disconnect tab DnD only if GTK version < 2.10 
     
    448458 
    449459                self.notebook.remove_page(self.notebook.page_num(ctrl.widget)) 
    450  
    451                 fjid = ctrl.get_full_jid() 
    452                 thread_id = ctrl.session.thread_id 
    453460 
    454461                del self._controls[ctrl.account][fjid][thread_id]