From f347ec202fe5b4404fa380694d7fe3d3d070ae7b Mon Sep 17 00:00:00 2001 From: Simon Poirier Date: Mon, 18 May 2009 20:27:41 +0000 Subject: fixed major missing parts in bundler integrated bundler to creator tutorial loading still is unusable (fiters don't seem to load) --- (limited to 'src/sugar/tutorius/gtkutils.py') 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 -- cgit v0.9.1