Browse Source

Do not change the statusicon if we don't have a status icon

master
Julio Biason 15 years ago
parent
commit
2247300cd6
  1. 18
      mitterlib/ui/ui_pygtk.py

18
mitterlib/ui/ui_pygtk.py

@ -434,11 +434,12 @@ class Interface(object):
replies = self._main_tabs.get_nth_page(1)
self._update_title(data, replies.count)
if (data + replies.count) > 0:
self._statusicon.set_from_pixbuf(self._images['new-messages'])
return
if self._statusicon:
if (data + replies.count) > 0:
self._statusicon.set_from_pixbuf(self._images['new-messages'])
return
self._statusicon.set_from_pixbuf(self._images['icon'])
self._statusicon.set_from_pixbuf(self._images['icon'])
return
def _update_replies_count(self, widget, data):
@ -450,11 +451,12 @@ class Interface(object):
messages = self._main_tabs.get_nth_page(0)
self._update_title(messages.count, data)
if (data + messages.count) > 0:
self._statusicon.set_from_pixbuf(self._images['new-messages'])
return
if self._statusicon:
if (data + messages.count) > 0:
self._statusicon.set_from_pixbuf(self._images['new-messages'])
return
self._statusicon.set_from_pixbuf(self._images['icon'])
self._statusicon.set_from_pixbuf(self._images['icon'])
return
def _clear_posts(self, widget):

Loading…
Cancel
Save