Do not count gc messages in tabs if notify_on_all_muc_messages is false.

This commit is contained in:
Julien Pivotto 2007-05-21 19:43:33 +00:00
parent 94186d6d16
commit cd8316aa9e
1 changed files with 8 additions and 7 deletions

View File

@ -409,13 +409,14 @@ class GroupchatControl(ChatControlBase):
label_str = self.name label_str = self.name
# count waiting highlighted messages # count waiting highlighted messages
unread = '' if gajim.config.get('notify_on_all_muc_messages'):
num_unread = self.get_nb_unread() unread = ''
if num_unread == 1: num_unread = self.get_nb_unread()
unread = '*' if num_unread == 1:
elif num_unread > 1: unread = '*'
unread = '[' + unicode(num_unread) + ']' elif num_unread > 1:
label_str = unread + label_str unread = '[' + unicode(num_unread) + ']'
label_str = unread + label_str
return (label_str, color) return (label_str, color)
def get_tab_image(self): def get_tab_image(self):