[pygtk] refreshing gtk.IconView

Frédéric frederic.mantegazza at gbiloba.org
Mon Jul 14 00:06:32 WST 2008


On dimanche 13 juillet 2008, spooky.ln at tbs-software.com wrote:

> im trying write simple app for viewing my photo collection.
> and now i have little problem. I want update IconView after
> every
> single loaded photo and not update after all photos loaded.

I think you have to launch a thread which will parse your photos, and 
update the GUI.

You will have to take care about asynchronous refresh from that thread: you 
can't just call gtk methods from it. The solution is to create a queue, 
where threads put commands, and have this queue read by the main thread 
(using timeout_add). I can send you such 'serializer' if you want...

-- 
    Frédéric

    http://www.gbiloba.org


More information about the pygtk mailing list