don't remove chat state when we receive a presence

This commit is contained in:
Yann Leboulanger 2005-10-13 18:23:47 +00:00
parent 19d99e0a89
commit 95ad04abfb
2 changed files with 4 additions and 4 deletions

View File

@ -639,8 +639,7 @@ class RosterWindow:
if contact == gajim.get_contact_instance_with_highest_priority(\ if contact == gajim.get_contact_instance_with_highest_priority(\
account, contact.jid): account, contact.jid):
self.plugin.windows[account]['chats'][jid].draw_name_banner( self.plugin.windows[account]['chats'][jid].draw_name_banner(contact)
contact, chatstate = None)
def on_info(self, widget, user, account): def on_info(self, widget, user, account):
'''Call vcard_information_window class to display user's information''' '''Call vcard_information_window class to display user's information'''

View File

@ -184,7 +184,7 @@ class TabbedChatWindow(chat.Chat):
# add the fat line at the top # add the fat line at the top
self.draw_name_banner(contact) self.draw_name_banner(contact)
def draw_name_banner(self, contact, chatstate = None): def draw_name_banner(self, contact):
'''Draw the fat line at the top of the window that '''Draw the fat line at the top of the window that
houses the status icon, name, jid, and avatar''' houses the status icon, name, jid, and avatar'''
# this is the text for the big brown bar # this is the text for the big brown bar
@ -212,6 +212,7 @@ class TabbedChatWindow(chat.Chat):
st = gajim.config.get('chat_state_notifications') st = gajim.config.get('chat_state_notifications')
chatstate = contact.chatstate
if chatstate and st in ('composing_only', 'all'): if chatstate and st in ('composing_only', 'all'):
if st == 'all': if st == 'all':
chatstate = helpers.get_uf_chatstate(chatstate) chatstate = helpers.get_uf_chatstate(chatstate)
@ -444,7 +445,7 @@ class TabbedChatWindow(chat.Chat):
def handle_incoming_chatstate(self, account, jid, chatstate): def handle_incoming_chatstate(self, account, jid, chatstate):
''' handle incoming chatstate that jid SENT TO us ''' ''' handle incoming chatstate that jid SENT TO us '''
contact = gajim.get_first_contact_instance_from_jid(account, jid) contact = gajim.get_first_contact_instance_from_jid(account, jid)
self.draw_name_banner(contact, chatstate) self.draw_name_banner(contact)
# update chatstate in tab for this chat # update chatstate in tab for this chat
self.redraw_tab(contact.jid, chatstate) self.redraw_tab(contact.jid, chatstate)