Hi,

i'm trying to make a litte function wich changes randomly a
gtk.Pixmap(pixmap, mask). But each time i call this function the program
takes more and more system memory, until system or X-server dies. What
do i do wrong for a such thing to happen ?

def switch(self, widget):
    images = ['1.png', '2.png', '3.png']
    self.pixbuf = gtk.gdk.pixbuf_new_from_file(
                  images[random.randint(0, 2)])
    pixmap, mask = self.pixbuf.render_pixmap_and_mask()
    self.pixmap.set(pixmap, mask)

Thank you.

Regards.

-- 
mammique <[EMAIL PROTECTED]>

_______________________________________________
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