[Sugar-devel] Object Chooser (was Re: Etoys mp3 files)

Sascha Silbe silbe at activitycentral.com
Tue Jun 5 03:53:19 EDT 2012


Ajay Garg <ajaygargnsit at gmail.com> writes:

> a)
> As mentioned in one of the earlier emails, 'get_properties' method needs to
> succeed to open a journal/external-USB-drive object.
> So, my query is : is the end-result just opening of the file (from
> journal/external-USB-drive), or something more too ?

get_properties() is part of the data store API (i.e. we are talking
about org.laptop.sugar.DataStore.get_properties()), not of the Journal
API (there is no org.laptop.Journal.get_properties()). Unlike in Sugar
0.82, the current data store API (as implemented by sugar-datastore and
gdatastore) does not support external storage media.

Sugar 0.84.26+ and Sugar 0.92+ support metadata for files on external
storage devices, but this is handled in the Journal, not in the data
store. And while the Object Chooser (in the Journal) allows the user to
choose an object on an external storage device, it doesn't have API to
access the corresponding metadata. This wasn't a problem in Sugar 0.84 -
0.84.25 and 0.86 - 0.90 as there was no metadata for objects
(i.e. files) on external storage devices, but when adding the metadata
support in 0.84.26+ / 0.92+ we should have extended the API accordingly.

The easiest and backwards-compatible fix for this would indeed be to
copy the entry to the Journal first. It would also be consistent with
what we do when the user resumes an entry from within the Journal.

Maybe we should really just do the short-term fix and handle the
resulting large files problem as part of SL#496. The Object Chooser
needs a major overhaul anyway (the current API is prone to race
conditions and doesn't really support using the Object Chooser as a
powerbox [2]).

Sascha

[1] https://bugs.sugarlabs.org/ticket/496
[2] https://en.wikipedia.org/wiki/File_dialog#Powerbox
-- 
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/20120605/088e9d5f/attachment.pgp>


More information about the Sugar-devel mailing list