[sugar] Wrapping Sugar activities for other desktops

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Sat Nov 8 16:56:19 EST 2008


Marco Pesenti Gritti wrote:
> On Sat, Nov 8, 2008 at 6:45 PM, Benjamin M. Schwartz
> <bmschwar at fas.harvard.edu> wrote:
>> Marco Pesenti Gritti wrote:
>>> On Fri, Nov 7, 2008 at 2:21 PM, Martin Langhoff
>>> <martin.langhoff at gmail.com> wrote:
>>>> Well, our journal use model says that the document is picked before
>>>> the app is called, so if we support
>>>>
>>>>  $ sugar-wrapper Write.xo mydocument.rtf
>>>>
>>>> then we're done. (Again, I might be extraordinarily naive about this :-) ).
>>> Currently activities uses the datastore dbus service to open/save
>>> files (ultimately they just open/save from disk, but there are some
>>> dbus calls to interact with the datastore), so it would mean to
>>> support two different code paths in the activities.
>> For the simple case of launching an activity by resuming an instance from
>> the Journal, I don't think that's true.
> 
> Can you elaborate? I'm probably missing something... In the resuming
> case currently a journal UID is passed to the activity, which gets the
> path to the corresponding file using the datastore dbus API. How do
> you propose to change that to work without a datastore/journal?

There are two issues here:
1.  I don't know how the inner workings are designed, but as a Python
activity author I never have to write a datastore call.  My impression is
that the Journal asks Rainbow's launcher service to start the activity
with a particular object-id.  The launcher service starts the activity,
loads the file from the Journal, and then calls the activity's read_file()
method on the resulting filename.

2.  I'm not suggesting that we "work without a datastore/journal".  I am
suggesting that the sugar-wrapper will instantiate a D-Bus daemon that
provides the datastore API.

--Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.laptop.org/pipermail/devel/attachments/20081108/f8c367d4/attachment.sig>


More information about the Devel mailing list