refreshing gtk.IconView

hi all,
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.
here`s source

from __future__ import with_statement
import threading
import gtk
import os   
gtk.gdk.threads_init()

class app(gtk.Window):
    def __init__(self):
        gtk.Window.__init__(self)
        self.set_title("spoView")
        self.set_default_size(400, 500)
        self.connect("destroy", gtk.main_quit)

        scroll = gtk.ScrolledWindow()
        scroll.set_border_width(2)
        scroll.set_shadow_type(gtk.SHADOW_ETCHED_IN)
        scroll.set_policy(gtk.POLICY_AUTOMATIC,
gtk.POLICY_AUTOMATIC)

        thumb_view = gtk.IconView()
        model = gtk.ListStore(str, gtk.gdk.Pixbuf)
        thumb_view.set_model(model)
        thumb_view.set_text_column(0)
(Continue reading)

Frédéric | 13 Jul 18:06

Re: refreshing gtk.IconView

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
_______________________________________________
pygtk mailing list   pygtk <at> daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Gmane