Browse Source

Status Iconc changing properly (the amount of debug messags is annoying,

though)
master
Julio Biason 15 years ago
parent
commit
9274e12757
  1. 26
      mitterlib/ui/ui_pygtk.py

26
mitterlib/ui/ui_pygtk.py

@ -412,6 +412,19 @@ class Interface(object):
child = self._main_tabs.get_nth_page(0)
message = _('Messages (%d)') % (data)
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
child = self._main_tabs.get_nth_page(1)
if child.count > 0:
_log.debug('Replies have messages, not changing status icon')
return
_log.debug('No messages or replies, changing status icon')
self._statusicon.set_from_pixbuf(self._images['icon'])
return
def _update_replies_count(self, widget, data):
@ -420,6 +433,19 @@ class Interface(object):
child = self._main_tabs.get_nth_page(1)
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
child = self._main_tabs.get_nth_page(0)
if child.count > 0:
_log.debug('Messages have new messages, not changing status icon')
return
_log.debug('No messages or replies, changing status icon')
self._statusicon.set_from_pixbuf(self._images['icon'])
return
def _clear_posts(self, widget):

Loading…
Cancel
Save