Fix some style nitpicks
This commit is contained in:
@@ -25,10 +25,12 @@ _DISCHARGING_PROP = 'battery.rechargeable.is_discharging'
|
||||
|
||||
class Device(device.Device):
|
||||
__gproperties__ = {
|
||||
'level' : (int, None, None, 0, 100, 0,
|
||||
gobject.PARAM_READABLE),
|
||||
'charging' : (bool, None, None, False, gobject.PARAM_READABLE),
|
||||
'discharging' : (bool, None, None, False, gobject.PARAM_READABLE)
|
||||
'level' : (int, None, None, 0, 100, 0,
|
||||
gobject.PARAM_READABLE),
|
||||
'charging' : (bool, None, None, False,
|
||||
gobject.PARAM_READABLE),
|
||||
'discharging' : (bool, None, None, False,
|
||||
gobject.PARAM_READABLE)
|
||||
}
|
||||
|
||||
def __init__(self, udi):
|
||||
|
||||
@@ -66,7 +66,7 @@ class BatteryPalette(Palette):
|
||||
|
||||
def update_progress_bar(self, percent):
|
||||
self._level = percent
|
||||
fraction = float(percent/100.0)
|
||||
fraction = percent / 100.0
|
||||
self._progress_bar.set_fraction(fraction)
|
||||
|
||||
def update_charge_status(self, charging, discharging):
|
||||
|
||||
Reference in New Issue
Block a user