Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/tutorius/gtkutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sugar/tutorius/gtkutils.py')
-rw-r--r--src/sugar/tutorius/gtkutils.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/sugar/tutorius/gtkutils.py b/src/sugar/tutorius/gtkutils.py
index a745b9d..1a9cb0f 100644
--- a/src/sugar/tutorius/gtkutils.py
+++ b/src/sugar/tutorius/gtkutils.py
@@ -19,6 +19,19 @@ Utility classes and functions that are gtk related
"""
import gtk
+def raddr_lookup(widget):
+ name = []
+ child = widget
+ parent = widget.parent
+ while parent:
+ name.append(str(parent.get_children().index(child)))
+ child = parent
+ parent = child.parent
+
+ name.append("0") # root object itself
+ name.reverse()
+ return ".".join(name)
+
def find_widget(base, target_fqdn):
"""Find a widget by digging into a parent widget's children tree