diff options
author | Manuel QuiƱones <manuq@laptop.org> | 2012-08-08 13:17:38 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-09-03 08:05:28 (GMT) |
commit | ecac8877be75463678f3beada91cd592e66deab2 (patch) | |
tree | 080ebea93959edc1b30c46142a927dd093fd08c6 /extensions | |
parent | 69fa57eff1b93a37a140a1d1ffeca65ddb9582ad (diff) |
Fix battery maxint to use gobject constant instead of the sys module constant
Otherwise gives OverflowError in 64 bits systems. When porting to
GTK+3 should be: GObject.G_MAXINT32
See as well: https://bugzilla.gnome.org/show_bug.cgi?id=680005
Signed-off-by: Manuel QuiƱones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/deviceicon/battery.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py index 5a6d99a..3354c08 100644 --- a/extensions/deviceicon/battery.py +++ b/extensions/deviceicon/battery.py @@ -16,7 +16,6 @@ import logging from gettext import gettext as _ -import sys import gconf import glib @@ -176,7 +175,7 @@ class BatteryPalette(Palette): class DeviceModel(gobject.GObject): __gproperties__ = { 'level': (int, None, None, 0, 100, 0, gobject.PARAM_READABLE), - 'time-remaining': (int, None, None, 0, sys.maxint, 0, + 'time-remaining': (int, None, None, 0, gobject.constants.G_MAXINT32, 0, gobject.PARAM_READABLE), # unit: seconds 'charging': (bool, None, None, False, gobject.PARAM_READABLE), 'discharging': (bool, None, None, False, gobject.PARAM_READABLE), |