Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/addons/EmbeddedInterpreter.py
diff options
context:
space:
mode:
authormike <michael.jmontcalm@gmail.com>2009-11-06 03:06:06 (GMT)
committer mike <michael.jmontcalm@gmail.com>2009-11-06 03:06:06 (GMT)
commitc7c7f94fc5d7e9f7e4f175c06dd52628aa357e3d (patch)
tree25008422c07d68028c0c64d8f41c0fbef54e9ade /addons/EmbeddedInterpreter.py
parentfe07a6fa0fa0d67d2ada6be1f3da2cb128f9038b (diff)
parent74dcbcb643cfd66df071020320ba6c0004e92c17 (diff)
Merge branch 'lp448319' of ../mainline
Conflicts: addons/readfile.py tests/probetests.py tests/run-tests.py tutorius/TProbe.py tutorius/constraints.py tutorius/core.py tutorius/engine.py tutorius/properties.py tutorius/service.py
Diffstat (limited to 'addons/EmbeddedInterpreter.py')
-rw-r--r--addons/EmbeddedInterpreter.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/addons/EmbeddedInterpreter.py b/addons/EmbeddedInterpreter.py
new file mode 100644
index 0000000..8c3522e
--- /dev/null
+++ b/addons/EmbeddedInterpreter.py
@@ -0,0 +1,30 @@
+from sugar.tutorius.actions import Action
+from sugar.tutorius.editor_interpreter import EditorInterpreter
+from sugar.tutorius.services import ObjectStore
+
+class EmbeddedInterpreter(Action):
+ def __init__(self):
+ Action.__init__(self)
+ self.activity = None
+ self._dialog = None
+
+ def do(self):
+ os = ObjectStore()
+ if os.activity:
+ self.activity = os.activity
+
+ self._dialog = EditorInterpreter(self.activity)
+ self._dialog.show()
+
+
+ def undo(self):
+ if self._dialog:
+ self._dialog.destroy()
+
+__action__ = {
+ "name" : "EmbeddedInterpreter",
+ "display_name" : "Embedded Interpreter",
+ "icon" : "message-bubble",
+ "class" : EmbeddedInterpreter,
+ "mandatory_props" : []
+}