[Sugar-devel] New Chapter in Make Your Own Sugar Activities needs review

Sascha Silbe sascha-ml-ui-sugar-devel at silbe.org
Mon Mar 29 18:23:57 EDT 2010


On Mon, Mar 29, 2010 at 01:21:01PM +0200, Bert Freudenberg wrote:

> Since the signals necessary for [listening to data store updates] are 
> not exposed in the higher-level datastore abstractions, you need to go 
> down to the D-Bus level (lifted from jarabe/journal/model.py):
Actually as of 0.88 they are - check out 
sugar.datastore.datastore.{created,updated,deleted}.

> And if you wanted to get really fancy you could mention how to add a 
> progress bar while creating a datastore entry. You might have noticed 
> the Browse activity doing that - if you start downloading a file and 
> switch to the Journal, the entry shows a progress bar.
> If Sugar Commander copies a large file into the Journal, it could do 
> the same.
Please don't. The progress bar works by updating the 'progress' property 
of the entry. Since the current data store does not support 
metadata-only updates, this means submitting the entire file over and 
over again.
You could copy the file to some temporary location first and use the 
progress bar for that part of the operation (as the data store entry 
doesn't contain any data yet at that point this is cheap enough), but 
doing two copies is usually a bad idea.

CU Sascha

-- 
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: 490 bytes
Desc: Digital signature
Url : http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100330/dc4470a3/attachment.pgp 


More information about the Sugar-devel mailing list