I noticed today that some of the stock images seem to be missing when
creating widgets in PyGtk2 that use them.  At Havoc's suggestion I ran Gtk's
stock image demo.  Everything worked fine there.  On my system at least, the
script below fails to display the UP or DOWN stock images.  The BACK and
FORWARD images display properly.

    #!/usr/bin/env python

    import gtk

    w = gtk.Window()
    w.connect("destroy", gtk.mainquit)

    tbl = gtk.Table(4, 2)
    tbl.set_homogeneous(gtk.TRUE)
    w.add(tbl)

    aopt = gtk.EXPAND|gtk.FILL|gtk.SHRINK

    r = 0
    for label,stock in (("GO_UP", "gtk-go-up"),
                        ("GO_DOWN", "gtk-go-down"),
                        ("GO_BACK", "gtk-go-back"),
                        ("GO_FORWARD", "gtk-go-forward")):
        c = 0
        tbl.attach(gtk.Label(label),c,c+1,r,r+1, aopt, aopt, 0, 0)
        c = 1
        tbl.attach(gtk.Button(stock=stock),c,c+1,r,r+1, aopt, aopt, 0, 0)
        r += 1

    w.show_all()
    gtk.mainloop()

This is extremely weird, because the pixbufs are hard-coded into Gtk.  There
are no files that can be missing.  Can someone explain to me what's going
on?

Thanks,

-- 
Skip Montanaro ([EMAIL PROTECTED])
http://www.mojam.com/
http://www.musi-cal.com/
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to