Don't open a main window when battery is critical
The main window suddenly opening when a battery is critical is very disruptive. It can pop up on all sort of undesirable scenarios. Rather than catch users of guard, merely show a notification that the battery is critical.
This commit is contained in:
parent
27d3d80d30
commit
63a98819a6
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue