fixed bt when closing tab when multiple tabs with a JID are open
This commit is contained in:
parent
80d68e140f
commit
fffa574015
|
@ -440,7 +440,17 @@ class MessageWindow(object):
|
||||||
# Update external state
|
# Update external state
|
||||||
gajim.events.remove_events(ctrl.account, ctrl.get_full_jid,
|
gajim.events.remove_events(ctrl.account, ctrl.get_full_jid,
|
||||||
types = ['printed_msg', 'chat', 'gc_msg'])
|
types = ['printed_msg', 'chat', 'gc_msg'])
|
||||||
del gajim.last_message_time[ctrl.account][ctrl.get_full_jid()]
|
|
||||||
|
fjid = ctrl.get_full_jid()
|
||||||
|
jid = gajim.get_jid_without_resource(fjid)
|
||||||
|
thread_id = ctrl.session.thread_id
|
||||||
|
|
||||||
|
fctrls = self.get_controls(fjid, ctrl.account)
|
||||||
|
bctrls = self.get_controls(jid, ctrl.account)
|
||||||
|
# keep last_message_time around unless this was our last control with
|
||||||
|
# that jid
|
||||||
|
if not fctrls and not bctrls:
|
||||||
|
del gajim.last_message_time[ctrl.account][fjid]
|
||||||
|
|
||||||
# Disconnect tab DnD only if GTK version < 2.10
|
# Disconnect tab DnD only if GTK version < 2.10
|
||||||
if gtk.pygtk_version < (2, 10, 0) or gtk.gtk_version < (2, 10, 0):
|
if gtk.pygtk_version < (2, 10, 0) or gtk.gtk_version < (2, 10, 0):
|
||||||
|
@ -448,9 +458,6 @@ class MessageWindow(object):
|
||||||
|
|
||||||
self.notebook.remove_page(self.notebook.page_num(ctrl.widget))
|
self.notebook.remove_page(self.notebook.page_num(ctrl.widget))
|
||||||
|
|
||||||
fjid = ctrl.get_full_jid()
|
|
||||||
thread_id = ctrl.session.thread_id
|
|
||||||
|
|
||||||
del self._controls[ctrl.account][fjid][thread_id]
|
del self._controls[ctrl.account][fjid][thread_id]
|
||||||
|
|
||||||
if len(self._controls[ctrl.account][fjid]) == 0:
|
if len(self._controls[ctrl.account][fjid]) == 0:
|
||||||
|
|
Loading…
Reference in New Issue