[Sugar-devel] [PATCH] G_MIN/MAX constants have been moved into GObject overrides

Simon Schampijer simon at schampijer.de
Thu Apr 25 06:53:22 EDT 2013


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

On 04/25/2013 12:45 PM, Simon Schampijer wrote:
> From: Simon Schampijer <simon at laptop.org>
>
> See pygobject c2aa6f0d0ed4c4e60f081b106dc7a65513963fce
> ---
>   extensions/deviceicon/battery.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py
> index 21dc5f3..6bf27ef 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.constants.G_MAXINT32, 0,
> +        'time-remaining': (int, None, None, 0, GObject.G_MAXINT32, 0,
>                              GObject.PARAM_READABLE),  # unit: seconds
>           'charging': (bool, None, None, False, GObject.PARAM_READABLE),
>           'discharging': (bool, None, None, False, GObject.PARAM_READABLE),
>



More information about the Sugar-devel mailing list