[Sugar-devel] sugarless.py Implode version

Sascha Silbe silbe at activitycentral.com
Mon Jul 2 07:49:32 EDT 2012


James Cameron <quozl at laptop.org> writes:

> On Thu, Jun 28, 2012 at 11:36:25AM -0300, Gonzalo Odiard wrote:
>> +1 to keep the sugarless version working.
>> In the future, I hope we have more activities working in Gnome too.
>
> I would like to see every activity as a menu option in the GNOME
> menus.  ;-}

Then you may be interested in:

a) my proof-of-concept patch [1] to show XDG applications (e.g. Gnome
  applications) in a new mode of the Activities Favourites
  View. Feedback (e.g. reviews) would be quite welcome.

b) SL#2435: replacing activity.info with a .desktop file [2].

While a) is the opposite direction, the overall goal is having both
Sugar and non-Sugar applications show up in both the Sugar Home View and
non-Sugar menus / launchers.

As for the Python framework for writing Sugar Activities (AKA
sugar-toolkit), the file locations
(sugar.activity.activity.get_bundle_name(), .get_bundle_path(),
get_activity_root()) would need to be derived in a different way, as
Gnome doesn't set the Sugar-specific environment variables. The standard
Python trick of introspecting the path to the source of the current
module (__file__) may help. Or using a wrapper around
sugar.activity.activityfactory.create() to start the Activity inside
Gnome, which would take care of setting the environment variables that
the functions mentioned above expect.

It would also be good to get rid of the Sugar proprietary start-up
notification protocol [3], but when focusing on the "running Activities
inside Gnome" aspect, it may not even be necessary. A quick glimpse at
the code suggests that even though it's located inside sugar-toolkit,
the part of the start-up notification that would fail if the Shell
wasn't present is only used by sugar (jarabe.journal.misc.launch()). It
would also be used by the wrapper mentioned above, though. Simply
ignoring the failure to invoke org.laptop.Shell.NotifyLaunch() would be
an option.

So once the file location issues are sorted out, it would be interesting
to see what happens if you try to run a Sugar activity outside
Sugar. Apart from auto-save on Activity switch not working, I don't see
any obvious problem.

Sascha

[1] https://patchwork.sugarlabs.org/patch/717/
[2] https://bugs.sugarlabs.org/ticket/2435
[3] https://bugs.sugarlabs.org/ticket/2434
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120702/60b8ab4c/attachment.pgp>


More information about the Sugar-devel mailing list