diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-10-08 12:56:12 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-10-08 12:56:12 (GMT) |
commit | 6ebe910e93792c046912acb962496f20f323d93f (patch) | |
tree | 87527c39edd0304ab1bf905dbb7cc5886c7bd03a /sugar/bundle/activitybundle.py | |
parent | 6a4f83d37c0152319deedc7ed50a352f2f15e05c (diff) |
In preparation of enabling rainbow by default, remove
the factory service from the public API. The Exec field
will now launch an activity instance.
Add a -s argument to sugar-activity to enable the single
process mode for activities that really need it.
Diffstat (limited to 'sugar/bundle/activitybundle.py')
-rw-r--r-- | sugar/bundle/activitybundle.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sugar/bundle/activitybundle.py b/sugar/bundle/activitybundle.py index 0d5a5b4..3e21389 100644 --- a/sugar/bundle/activitybundle.py +++ b/sugar/bundle/activitybundle.py @@ -26,8 +26,6 @@ from sugar.bundle.bundle import Bundle, MalformedBundleException from sugar import activity from sugar import env -_PYTHON_FACTORY='sugar-activity-factory' - class ActivityBundle(Bundle): """A Sugar activity bundle @@ -81,6 +79,7 @@ class ActivityBundle(Bundle): raise MalformedBundleException( 'Activity bundle %s does not specify a name' % self._path) + # FIXME class is deprecated if cp.has_option(section, 'class'): self.activity_class = cp.get(section, 'class') elif cp.has_option(section, 'exec'): @@ -181,12 +180,9 @@ class ActivityBundle(Bundle): def get_command(self): """Get the command to execute to launch the activity factory""" if self.bundle_exec: - command = os.path.join(self._path, self.bundle_exec) - command = command.replace('$SUGAR_BUNDLE_PATH', self._path) - command = os.path.expandvars(command) + command = os.path.expandvars(self.bundle_exec) else: - command = '%s --bundle-path="%s"' % ( - env.get_bin_path(_PYTHON_FACTORY), self._path) + command = 'sugar-activity ' + self.activity_class return command |