blob: 8c3522e8d77664a3f4705f582e3959cb1b2841f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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" : []
}
|