fixed battery charge display in device info

This commit is contained in:
Daniel Pavel 2013-06-19 19:23:18 +02:00
parent 7e1a2a6e4f
commit 2fee88e54b
1 changed files with 3 additions and 4 deletions

View File

@ -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 += ' <small>(charging)</small>'
panel._battery._text.set_sensitive(True)
else:
text += ' <small>(last known)</small>'
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