hi folks,

I'm writing a software that uses gtk.IconView to show images (my photo
collection, so there are over 1000 pictures), and I'm experimenting
random segfaults with gtk.IconView and I can not figure it out the
reason, please if somebody has some tip on how to debug this.

I added a test case that shows (at least on my system) my trouble.

somebody can give me a clue?

thanks in advance
-- 
Felipe Reyes Astorga
counter.li.org #316380
import gtk
import threading
import os
import random

gtk.gdk.threads_init()

rootdir = "/usr/share/pixmaps/faces/"
img = os.listdir(rootdir)

win = gtk.Window()
win.set_size_request(300, 300)
scroll = gtk.ScrolledWindow()
iconview = gtk.IconView()
model = gtk.ListStore(gtk.gdk.Pixbuf, str)

win.add(scroll)
scroll.add_with_viewport(iconview)

iconview.set_model(model)
iconview.set_pixbuf_column(0)
iconview.set_text_column(1)

win.connect("delete-event", gtk.main_quit)

class FillListStore(threading.Thread):
    def run(self):
        model.clear()
        for i in range(600):
            print i
            a = random.randint(0, len(img)-1)
            model.append([gtk.gdk.pixbuf_new_from_file_at_size(rootdir + img[a], 64, 64),
                          str(i)])


thread = FillListStore()
thread.start()
win.show_all()
gtk.main()

Attachment: signature.asc
Description: Esta parte del mensaje está firmada digitalmente

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to