This commit is contained in:
Travis Shirk 2006-01-27 03:43:00 +00:00
parent ec927d3a4b
commit 50465c6265
2 changed files with 8 additions and 3 deletions

View File

@ -498,7 +498,7 @@ class ChatControlBase(MessageControl):
if self.conv_textview.at_the_end():
#we are at the end
if self.nb_unread > 0:
self.nb_unread = 0 + self.get_specific_unread()
self.nb_unread = self.get_specific_unread()
self.parent_win.redraw_tab(self)
self.parent_win.show_title()
if gajim.interface.systray_enabled:
@ -580,7 +580,9 @@ class ChatControlBase(MessageControl):
if not self.nb_unread:
return
jid = self.contact.jid
if self.conv_textview.at_the_end() and self.parent_win.window.is_active():
if self.conv_textview.at_the_end() and \
self.parent_win.get_active_control() == self and \
self.parent_win.window.is_active():
#we are at the end
self.nb_unread = self.get_specific_unread()
self.parent_win.redraw_tab(self)

View File

@ -109,7 +109,10 @@ class MessageControl:
self.compact_view_current = state
def get_specific_unread(self):
return 0
n = 0
if gajim.awaiting_events[self.account].has_key(self.contact.jid):
n = len(gajim.awaiting_events[self.account][self.contact.jid])
return n
def send_message(self, message, keyID = '', type = 'chat', chatstate = None):
'''Send the given message to the active tab'''