tray icon: pick the battery of the lowest _active_ device

This commit is contained in:
Daniel Pavel 2013-06-20 17:25:53 +02:00
parent 2fea5d9af2
commit d810ccba84
1 changed files with 2 additions and 1 deletions

View File

@ -284,7 +284,8 @@ def _pick_device_with_lowest_battery():
if info[1] is None: # is receiver/separator
continue
level = info[-1].get(_K.BATTERY_LEVEL)
if not picked or (level is not None and picked_level > level):
# print ("checking %s -> %s", info, level)
if level is not None and picked_level > level:
picked = info
picked_level = level or 0