[Sugar-devel] Problem listing journal objects

Jim Simmons nicestep at gmail.com
Mon Aug 17 16:04:17 EDT 2009


At lunch today I tried out my latest View Slides on my XO for the
first time and found that I *could* see all of the images with the
code I was using.  So it would seem to be an issue with the Sugar test
environment that ships with Fedora 11 and 10, and not an issue with
Sugar itself.  I think.  Also, the code to add an image to the slide
show is broken on the XO but works fine in Fedora 10 and 11.

So it looks like I don't have a question after all.

James Simmons

On Fri, Aug 14, 2009 at 11:17 AM, Jim Simmons<nicestep at gmail.com> wrote:
> In View Slides I have some code that lists out what image files it
> finds in the Journal and puts the results in a table, with the idea
> that these images may be added to a slide show.  Until now I have been
> just putting image files in the root directory of a thumb drive and
> have been using the code below to list them:
>
>        ds_objects, num_objects =
> datastore.find({'mime_type':['image/jpeg',  'image/gif', 'image/tiff',
>  \
>            'image/png']},  'title')
>        for i in xrange (0, num_objects, 1):
>            iter = self.ls_right.append()
>            self.ls_right.set(iter, COLUMN_IMAGE,
> ds_objects[i].metadata['title'])
>            self.ls_right.set(iter,  COLUMN_PATH,  ds_objects[i])
>
> Now this works, but there is a limit to how many files you can put in
> a thumb drive root.  I decided to make subdirectories in the thumb
> drive and put images in each.  As far as the Journal Activity itself
> is concerned this works fine.  I have no problem seeing my image files
> in the Journal Activity when it is pointing to the thumb drive.
> However, I do not get a listing of the stuff in the thumb drive with
> this code, unless the picture is in the root directory of the thumb
> drive.
>
> Obviously there is a way to list out these images since the Journal
> can do it.  So what am I missing here?
>
> Thanks,
>
> James Simmons
>


More information about the Sugar-devel mailing list