Improve [8168]: correct window title and print number of marked messages
in tabs.
This commit is contained in:
parent
cd8316aa9e
commit
05542130fa
1 changed files with 11 additions and 9 deletions
|
@ -409,14 +409,13 @@ class GroupchatControl(ChatControlBase):
|
||||||
label_str = self.name
|
label_str = self.name
|
||||||
|
|
||||||
# count waiting highlighted messages
|
# count waiting highlighted messages
|
||||||
if gajim.config.get('notify_on_all_muc_messages'):
|
unread = ''
|
||||||
unread = ''
|
num_unread = self.get_nb_unread()
|
||||||
num_unread = self.get_nb_unread()
|
if num_unread == 1:
|
||||||
if num_unread == 1:
|
unread = '*'
|
||||||
unread = '*'
|
elif num_unread > 1:
|
||||||
elif num_unread > 1:
|
unread = '[' + unicode(num_unread) + ']'
|
||||||
unread = '[' + unicode(num_unread) + ']'
|
label_str = unread + label_str
|
||||||
label_str = unread + label_str
|
|
||||||
return (label_str, color)
|
return (label_str, color)
|
||||||
|
|
||||||
def get_tab_image(self):
|
def get_tab_image(self):
|
||||||
|
@ -671,7 +670,10 @@ class GroupchatControl(ChatControlBase):
|
||||||
|
|
||||||
def get_nb_unread(self):
|
def get_nb_unread(self):
|
||||||
nb = len(gajim.events.get_events(self.account, self.room_jid,
|
nb = len(gajim.events.get_events(self.account, self.room_jid,
|
||||||
['printed_gc_msg', 'printed_marked_gc_msg']))
|
['printed_marked_gc_msg']))
|
||||||
|
if gajim.config.get('notify_on_all_muc_messages'):
|
||||||
|
nb += len(gajim.events.get_events(self.account, self.room_jid,
|
||||||
|
['printed_gc_msg']))
|
||||||
nb += self.get_nb_unread_pm()
|
nb += self.get_nb_unread_pm()
|
||||||
return nb
|
return nb
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue