[Sugar-devel] [PATCH] Fix battery maxint to use gobject constant instead of the sys module constant
Manuel Quiñones
manuq at laptop.org
Wed Aug 8 09:17:38 EDT 2012
Otherwise gives OverflowError in 64 bits systems. When porting to
GTK+3 should be: GObject.G_MAXINT32
Signed-off-by: Manuel Quiñones <manuq at laptop.org>
---
extensions/deviceicon/battery.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py
index a70458a..8e1cd8e 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
@@ -171,7 +170,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),
--
1.7.10.4
More information about the Sugar-devel
mailing list