Show error icon on connection error. #3

Merged
RomanZhilich merged 1 commits from fix_error_icon into dev 2016-02-02 10:51:02 +03:00
1 changed files with 3 additions and 0 deletions

View File

@ -176,6 +176,9 @@ def mail_check():
if mail_count == 0: if mail_count == 0:
window.trayIcon.setToolTip ("You have no unread mail") window.trayIcon.setToolTip ("You have no unread mail")
window.trayIcon.setIcon(QIcon(":icons/mailbox_empty.png")) window.trayIcon.setIcon(QIcon(":icons/mailbox_empty.png"))
elif mail_count == "ERROR":
window.trayIcon.setIcon(QIcon(":icons/mailbox_error.png"))
window.trayIcon.setToolTip ("Error checking mail.")
else: else:
window.trayIcon.setToolTip ("You have "+ str(mail_count)+" unread letters") window.trayIcon.setToolTip ("You have "+ str(mail_count)+" unread letters")
window.trayIcon.setIcon(QIcon(":icons/mailbox_full.png")) window.trayIcon.setIcon(QIcon(":icons/mailbox_full.png"))