From 2fee88e54b2388c7dc6ec2d679eb57c777c5ffc0 Mon Sep 17 00:00:00 2001 From: Daniel Pavel Date: Wed, 19 Jun 2013 19:23:18 +0200 Subject: [PATCH] fixed battery charge display in device info --- lib/solaar/ui/window.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/solaar/ui/window.py b/lib/solaar/ui/window.py index 5c6335f7..fcee57d6 100644 --- a/lib/solaar/ui/window.py +++ b/lib/solaar/ui/window.py @@ -517,14 +517,13 @@ def _update_device_panel(device, panel, buttons, full=False): panel._battery._icon.set_sensitive(True) text = '%d%%' % battery_level - if bool(device.status): + if is_active: if charging: text += ' (charging)' - panel._battery._text.set_sensitive(True) else: text += ' (last known)' - panel._battery._text.set_sensitive(False) - panel._battery._text.set_markup(text) + panel._battery._text.set_sensitive(is_active) + panel._battery._text.set_markup(text) if is_active: not_secure = device.status.get(_ENCRYPTED) == False