Merge pull request #257 from hobarrera/subtle-critical-battery-notification

Don't open a main window when battery is critical
This commit is contained in:
Peter Wu 2016-03-14 00:36:26 +01:00
commit 4ccb8ab26d
1 changed files with 2 additions and 2 deletions

View File

@ -161,10 +161,10 @@ def _status_changed(device, alert, reason):
if alert & ALERT.ATTENTION:
tray.attention(reason)
need_popup = alert & (ALERT.SHOW_WINDOW | ALERT.ATTENTION)
need_popup = alert & ALERT.SHOW_WINDOW
window.update(device, need_popup)
if alert & ALERT.NOTIFICATION:
if alert & (ALERT.NOTIFICATION | ALERT.ATTENTION):
notify.show(device, reason)