[Sugar-devel] Proposing ObjectChooser with preview feature

Daniel Narvaez dwnarvaez at gmail.com
Fri Jul 5 07:37:55 EDT 2013

This would be fine with me. There is almost a month to feature freeze
and only two of the features originally agreed are left to land, with one
having had already an initial review. So I'd say we have enough time to
handle this.

Manuel, Simon, what do you think?

On Friday, 5 July 2013, Gonzalo Odiard wrote:

> As the time to include new features has ended,
> I want request a exception to include one more change.
> This feature modify the ObjectChooser, adding a option show_preview,
> if the option is True, instead of showing a listview similar to the
> Journal,
> show a IconView with the object preview, and the object title.
> This is useful for activities with a option to include images from the
> Journal,
> as Paint, Write, Fototoon, and Memorize.
> I added the option instead of adding the iconview to all the ObjectChooser,
> because is a bit slower to start if you have a Journal with many images.
> Regarding implementation, there are changes in sugar [1] and
> sugar-toolkit-gtk3 [2]
> Every branch have two patches, the first is a preparation, moving the code
> used
> to generate a image from the datastore preview data, from expandedentry.py
> in sugar,
> to datastore.py in sugar-toolkit-gtk3. I moved this to the toolkit,
> because there are activities using that too, like Portfolio and
> JournalShare.
> May be should be better create another package as datastore/utils or
> similar
> instead of using datastore/datastore, because I couldn't use the size
> constants
> defined in activity.py, because activity.py already import
> datastore/datastore.
> The other change implement a iconmodel/iconview, similar to
> listmodel/listview,
> using a custom CellRendererPIxbuf to genereate the pixbuf as needed,
> instead of generate all the images at once. In the future we can show a
> star
> for the favorite objects using the same renderer.
> Comments are welcome,
> Gonzalo
> [1] https://github.com/sugarlabs/sugar/pull/48
> [2] https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/17

Daniel Narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130705/95fb084a/attachment.html>

More information about the Sugar-devel mailing list