diff options
author | mike <michael.jmontcalm@gmail.com> | 2009-12-09 02:58:20 (GMT) |
---|---|---|
committer | mike <michael.jmontcalm@gmail.com> | 2009-12-09 03:07:06 (GMT) |
commit | 394001c2e7c8585b7152e8f5888e340a0c7a1bbc (patch) | |
tree | 6254b8f0a17768c9e47aeafa5ff2c1992ff6d33c /tutorius/engine.py | |
parent | cf6785d168eaf3ed5505705478a6aea05ad3da98 (diff) |
Integration with Sugar : Exposing set_current_act on Service
Correcting two interface mismatches (install error on translator, subscribe error on creator)
Changing MessageButtonNext to ButtonNext
Diffstat (limited to 'tutorius/engine.py')
-rw-r--r-- | tutorius/engine.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tutorius/engine.py b/tutorius/engine.py index 39cfeeb..de58f88 100644 --- a/tutorius/engine.py +++ b/tutorius/engine.py @@ -108,7 +108,7 @@ class TutorialRunner(object): # Verify if we just completed the subscription of all the events for this state self._verify_event_install_state() - def subscribe_error(self, event_name, exception): + def subscribe_error(self, event_name, event, exception): # TODO : Do correct error handling here LOGGER.debug("TutorialRunner :: Could not subscribe to event %s, got exception : %s"%(event_name, str(exception))) self._subscription_errors[event_name] = exception @@ -317,10 +317,15 @@ class Engine: #Get the active activity from the shell activity = self._shell.get_active_activity() - #TProbes automatically use the bundle id, available from the ActivityBundle - bundle = ActivityBundle(activity.get_bundle_path()) - self._tutorial._activity_id = bundle.get_bundle_id() #HACK until we have activity id's in action/events + LOGGER.debug("Engine :: Launching tutorial on activity %s", activity.get_type()) + if hasattr(activity, 'is_journal') and activity.is_journal(): + self._tutorial._activity_id = 'org.laptop.JournalActivity' + else: + #TProbes automatically use the bundle id, available from the ActivityBundle + bundle = ActivityBundle(activity.get_bundle_path()) + + self._tutorial._activity_id = bundle.get_bundle_id() #HACK until we have activity id's in action/events self._tutorial.start() |