[Sugar-devel] [PATCH] G_MIN/MAX constants have been moved into GObject overrides
Simon Schampijer
simon at schampijer.de
Thu Apr 25 07:52:55 EDT 2013
On 04/25/2013 12:53 PM, Simon Schampijer wrote:
> The patch works with the latest Pygobject 3.8.x but as well in the 3.4.x
> series.
>
> Actually, using GLib.MAXINT32 would work as well. I will ask on #python
> what the correct/better one is.
>
> Regards,
> Simon
Confirmed on #python, we should use GLib.MAXINT32 as those are pulled in
directly from GI.
diff --git a/extensions/deviceicon/battery.py
b/extensions/deviceicon/battery.py
index 6bf27ef..362822d 100644
--- a/extensions/deviceicon/battery.py
+++ b/extensions/deviceicon/battery.py
@@ -177,7 +177,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, GObject.G_MAXINT32, 0,
+ 'time-remaining': (int, None, None, 0, GLib.MAXINT32, 0,
GObject.PARAM_READABLE), # unit: seconds
'charging': (bool, None, None, False, GObject.PARAM_READABLE),
'discharging': (bool, None, None, False, GObject.PARAM_READABLE),
Simon
More information about the Sugar-devel
mailing list