FIX of it seems you send 'gone' to active tab, which is wrong, I can close a tab in whic i'm not

This commit is contained in:
Nikos Kouremenos 2005-07-22 17:39:42 +00:00
parent c6046f9373
commit 3c215f1a79

View file

@ -289,7 +289,7 @@ class TabbedChatWindow(chat.Chat):
return return
# chatstates - window is destroyed, send gone # chatstates - window is destroyed, send gone
self.send_chatstate('gone') self.send_chatstate('gone', jid)
chat.Chat.remove_tab(self, jid, 'chats') chat.Chat.remove_tab(self, jid, 'chats')
if len(self.xmls) > 0: if len(self.xmls) > 0:
@ -450,7 +450,7 @@ class TabbedChatWindow(chat.Chat):
# if composing, send chatstate # if composing, send chatstate
self.send_chatstate('composing') self.send_chatstate('composing')
def send_chatstate(self, state): def send_chatstate(self, state, jid = None):
''' sends our chatstate as STANDLONE chat state message (eg. no body) ''' sends our chatstate as STANDLONE chat state message (eg. no body)
to the current tab only if new chatstate is different to the current tab only if new chatstate is different
from the previous one''' from the previous one'''
@ -468,6 +468,7 @@ class TabbedChatWindow(chat.Chat):
if not gajim.config.get('send_receive_chat_state_notifications'): if not gajim.config.get('send_receive_chat_state_notifications'):
return return
if jid is None:
jid = self.get_active_jid() jid = self.get_active_jid()
contact = gajim.get_first_contact_instance_from_jid(self.account, jid) contact = gajim.get_first_contact_instance_from_jid(self.account, jid)