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:
authorsimpoir <simpoir@Luyten.local>2009-03-06 13:37:20 (GMT)
committer simpoir <simpoir@Luyten.local>2009-03-06 13:37:20 (GMT)
commitd828a9f7ec6f678d02a0a84943e3e7ec1daaa8b0 (patch)
tree385da693f9751222a19f9e6e59ec4f7218b73a27 /src/sugar/tutorius/gtkutils.py
parent1b2454141511dcdde31ad6b5f65fb98ed3f09460 (diff)
Functionnal overlay manipulation
Conflicts: source/external/source/sugar-toolkit/src/sugar/tutorius/Makefile.am source/external/source/sugar-toolkit/src/sugar/tutorius/actions.py
Diffstat (limited to 'src/sugar/tutorius/gtkutils.py')
-rw-r--r--src/sugar/tutorius/gtkutils.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/sugar/tutorius/gtkutils.py b/src/sugar/tutorius/gtkutils.py
index 7196469..450872d 100644
--- a/src/sugar/tutorius/gtkutils.py
+++ b/src/sugar/tutorius/gtkutils.py
@@ -18,6 +18,12 @@
Utility classes and functions that are gtk related
"""
+def activity(activity=None, singleton=[]):
+ if activity:
+ singleton.append(activity)
+ return singleton[0]
+
+
def find_widget(base, target_fqdn):
"""Find a widget by digging into a parent widget's children tree
@param base the parent widget
@@ -39,7 +45,10 @@ def find_widget(base, target_fqdn):
path.pop(0)
while len(path) > 0:
- obj = obj.get_children()[int(path.pop(0))]
+ try:
+ obj = obj.get_children()[int(path.pop(0))]
+ except:
+ break
return obj