[Sugar-devel] [PATCH sugar-toolkit-gtk3] Object Chooser: update for GDK3 get_xid()

Simon Schampijer simon at schampijer.de
Tue May 22 07:01:09 EDT 2012


On 05/19/2012 10:43 PM, Daniel Drake wrote:
> In GDK3 the 'xid' attribute is gone and is replaced with
> gdk_x11_window_get_xid(), or the get_xid() method in Python.
>
> Needed to be able to open the object chooser from Browse without hassle.
>
> Signed-off-by: Daniel Drake<dsd at laptop.org>

Thanks Daniel, looks good, pushed it as 
fd7b599710a50d847b63e7c298d280caa4b04453

Regards,
    Simon

> ---
>   src/sugar3/graphics/objectchooser.py |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/sugar3/graphics/objectchooser.py b/src/sugar3/graphics/objectchooser.py
> index 47a04b3..8332bab 100644
> --- a/src/sugar3/graphics/objectchooser.py
> +++ b/src/sugar3/graphics/objectchooser.py
> @@ -40,8 +40,8 @@ class ObjectChooser(object):
>           if parent is None:
>               parent_xid = 0
>           elif hasattr(parent, 'get_window') and hasattr(parent.get_window(),
> -                                                       'xid'):
> -            parent_xid = parent.get_window().xid
> +                                                       'get_xid'):
> +            parent_xid = parent.get_window().get_xid()
>           else:
>               parent_xid = parent





More information about the Sugar-devel mailing list