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

Daniel Drake dsd at laptop.org
Sat May 19 16:43:16 EDT 2012


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>
---
 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
 
-- 
1.7.10.1



More information about the Sugar-devel mailing list