diff options
author | dave <drykod@gmail.com> | 2009-12-09 05:19:29 (GMT) |
---|---|---|
committer | dave <drykod@gmail.com> | 2009-12-09 05:19:29 (GMT) |
commit | 435a2c9be678f86f31d52ed1a9fec6d0edc4bc58 (patch) | |
tree | 45a6313d6207fea2361e9c8e8c4bd12dba215a6b /tutorius/creator.py | |
parent | be9519e96af2b0a26aec36b031118ae1e473fd08 (diff) |
fix end of tutorial msg to be displayed on current activity at save time
Diffstat (limited to 'tutorius/creator.py')
-rw-r--r-- | tutorius/creator.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tutorius/creator.py b/tutorius/creator.py index cdd7878..f30c61f 100644 --- a/tutorius/creator.py +++ b/tutorius/creator.py @@ -113,15 +113,6 @@ class Creator(Object): self._tutorial.update_transition( transition_name=self._tutorial.INITIAL_TRANSITION_NAME, new_state=self._state) - final_event = addon.create( - name='MessageButtonNext', - message=T('This is the end of this tutorial.') - ) - final_event.source = self._probe_mgr.currentActivity - self._tutorial.add_transition( - state_name=self._state, - transition=(final_event, self._tutorial.END), - ) else: self._tutorial = tutorial # TODO load existing tutorial; unused yet @@ -408,6 +399,16 @@ class Creator(Object): Save the currently edited tutorial to bundle, prompting for a name as needed. """ + final_event = addon.create( + name='MessageButtonNext', + message=T('This is the end of this tutorial.') + ) + final_event.source = self._probe_mgr.currentActivity + self._tutorial.add_transition( + state_name=self._state, + transition=(final_event, self._tutorial.END), + ) + if not self._guid: self._guid = str(uuid.uuid1()) dlg = TextInputDialog(parent=self._overview.win, |