Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/model/devices/battery.py10
-rw-r--r--shell/view/devices/battery.py2
-rwxr-xr-xtests/test-spread-layout.py1
3 files changed, 8 insertions, 5 deletions
diff --git a/shell/model/devices/battery.py b/shell/model/devices/battery.py
index b74d6dc..cdb4994 100644
--- a/shell/model/devices/battery.py
+++ b/shell/model/devices/battery.py
@@ -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):
diff --git a/shell/view/devices/battery.py b/shell/view/devices/battery.py
index 1628850..a4bb0bb 100644
--- a/shell/view/devices/battery.py
+++ b/shell/view/devices/battery.py
@@ -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):
diff --git a/tests/test-spread-layout.py b/tests/test-spread-layout.py
index 59b2875..412d7fc 100755
--- a/tests/test-spread-layout.py
+++ b/tests/test-spread-layout.py
@@ -36,6 +36,7 @@ def _create_icon():
scale = 1.0 + random.random() * 1.5
icon = CanvasIcon(scale=scale, xo_color=color,
icon_name='theme:stock-buddy')
+ icon.set_tooltip('Test')
layout.add(icon)
return (len(box.get_children()) < 50)