|
|
|
@ -351,7 +351,8 @@ class Interface(object):
|
|
|
|
|
'"Wiennat"', |
|
|
|
|
'Philip Reynolds', |
|
|
|
|
'Greg McIntyre', |
|
|
|
|
'"Alexander"']) |
|
|
|
|
'"Alexander"', |
|
|
|
|
'Renato Covarrubias']) |
|
|
|
|
if self._images['logo']: |
|
|
|
|
about_window.set_logo(self._images['logo']) |
|
|
|
|
about_window.run() |
|
|
|
@ -411,19 +412,24 @@ class Interface(object):
|
|
|
|
|
messages changes.""" |
|
|
|
|
child = self._main_tabs.get_nth_page(0) |
|
|
|
|
message = _('Messages (%d)') % (data) |
|
|
|
|
# do this specially for tabs since it seems really slow to update the |
|
|
|
|
# text (at least, on my computer); so we update only the required tab, |
|
|
|
|
# not both (even if we get both values here.) |
|
|
|
|
self._main_tabs.set_tab_label_text(child, message) |
|
|
|
|
|
|
|
|
|
if data > 0: |
|
|
|
|
_log.debug('We have new messages, changing status icon') |
|
|
|
|
self._statusicon.set_from_pixbuf(self._images['new-messages']) |
|
|
|
|
return |
|
|
|
|
replies = self._main_tabs.get_nth_page(1) |
|
|
|
|
messages_title = ('%d ' + |
|
|
|
|
N_('message', 'messages', data)) % (data) |
|
|
|
|
replies_title = ('%d ' + |
|
|
|
|
N_('reply', 'replies', replies.count)) % (replies.count) |
|
|
|
|
|
|
|
|
|
child = self._main_tabs.get_nth_page(1) |
|
|
|
|
if child.count > 0: |
|
|
|
|
_log.debug('Replies have messages, not changing status icon') |
|
|
|
|
title = 'Mitter (%s, %s)' % (messages_title, replies_title) |
|
|
|
|
self._main_window.set_title(title) |
|
|
|
|
|
|
|
|
|
if (data + replies.count) > 0: |
|
|
|
|
self._statusicon.set_from_pixbuf(self._images['new-messages']) |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
_log.debug('No messages or replies, changing status icon') |
|
|
|
|
self._statusicon.set_from_pixbuf(self._images['icon']) |
|
|
|
|
return |
|
|
|
|
|
|
|
|
@ -434,17 +440,18 @@ class Interface(object):
|
|
|
|
|
message = _('Replies (%d)') % (data) |
|
|
|
|
self._main_tabs.set_tab_label_text(child, message) |
|
|
|
|
|
|
|
|
|
if data > 0: |
|
|
|
|
_log.debug('We have new replies, changing status icon') |
|
|
|
|
self._statusicon.set_from_pixbuf(self._images['new-messages']) |
|
|
|
|
return |
|
|
|
|
messages = self._main_tabs.get_nth_page(0) |
|
|
|
|
messages_title = ('%d ' + |
|
|
|
|
N_('message', 'messages', messages.count)) % (messages.count) |
|
|
|
|
replies_title = ('%d ' + |
|
|
|
|
N_('reply', 'replies', data)) % (data) |
|
|
|
|
|
|
|
|
|
child = self._main_tabs.get_nth_page(0) |
|
|
|
|
if child.count > 0: |
|
|
|
|
_log.debug('Messages have new messages, not changing status icon') |
|
|
|
|
title = 'Mitter (%s, %s)' % (messages_title, replies_title) |
|
|
|
|
self._main_window.set_title(title) |
|
|
|
|
if (data + messages.count) > 0: |
|
|
|
|
self._statusicon.set_from_pixbuf(self._images['new-messages']) |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
_log.debug('No messages or replies, changing status icon') |
|
|
|
|
self._statusicon.set_from_pixbuf(self._images['icon']) |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|