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:
commit
4ccb8ab26d
|
@ -161,10 +161,10 @@ def _status_changed(device, alert, reason):
|
||||||
if alert & ALERT.ATTENTION:
|
if alert & ALERT.ATTENTION:
|
||||||
tray.attention(reason)
|
tray.attention(reason)
|
||||||
|
|
||||||
need_popup = alert & (ALERT.SHOW_WINDOW | ALERT.ATTENTION)
|
need_popup = alert & ALERT.SHOW_WINDOW
|
||||||
window.update(device, need_popup)
|
window.update(device, need_popup)
|
||||||
|
|
||||||
if alert & ALERT.NOTIFICATION:
|
if alert & (ALERT.NOTIFICATION | ALERT.ATTENTION):
|
||||||
notify.show(device, reason)
|
notify.show(device, reason)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue