[sugar] Activity launching changes

Marco Pesenti Gritti mpgritti
Mon Oct 8 09:34:43 EDT 2007


To facilitate integration with Rainbow, I refactored activity
launching a bit, to get rid of the factory service. This also makes
much easier the porting of existing applications.

What you specify on the Exec property of activity.info is now the
command used to spawn a new instance of the activity. The
SUGAR_ACTIVITY_BUNDLE environment variable points to the bundle path.
The Class property is deprecated but will continue to work (it should
be replaced with "Exec = sugar-activity $Class").

See the bundle spec for the parameters the executable should support:
http://wiki.laptop.org/go/Activity_bundles

Every activity instance is by default runned in a new process now. I
know of only two cases that cannot work with multiple processes, Etoys
and the Web activity.

For web activity we can just use the -s option of sugar-activity. When
a second instance starts it will check if the service name is already
owned and in that case request to the already running instance to
spawn a new window, and exit. (This is also how single process usually
works for GNOME applications).

Etoys presumably can deal with this using an internal mechanism?

I'm planning to do some refinement in the next few days, feedback is
welcome. Also please watch out for bugs introduced by the change.

Thanks,
Marco



More information about the Sugar-devel mailing list