[Sugar-devel] journal / datastore question

Erik Blankinship erikb at mediamods.com
Wed Dec 1 20:55:47 EST 2010


Let's say I have a gimp-like activity.

I launch the activity and it is "empty".  I open an image file via object
chooser, save the file back to the datastore.  I do this a few times.  When
I close my activity, I keep a reference to the datastore-id of the last
photo I edited so that it will resume with that photo.

When I reopen that activity-instance, I look up the last edited photo by its
saved datastore id and can resume work on it.  I close the activity again
and the datastore-id of the image is preserved.

Now, I go to the journal and open the gimp-line activity via an image file
(A.png) in the journal with a supported mime-type.

My activity's read_file figures out we are opening an image, and handles it
accordingly (it also keeps a reference to the open file).

The child makes some edits and saves their changes to the image.   I write
the changes to A.png in the datastore via the file handle I kept open.

In the same activity instance, I close A.png and open another image (B.png)
via an object chooser.  I work on that file and then quit the activity (with
an intention to save changes to B.png).

At this point, I am  prompted with a dialog box asking me to add metadata to
A.png  ... (i guess because that is the file used to open the activity?).

Is there a way to end this activity session with the final write_file being
to an activity instance -- not to the file used to open the instance?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101201/5d06772f/attachment.html>


More information about the Sugar-devel mailing list