On Wed, 2004-11-17 at 13:03 +0100, Gianmario Tagliaretti wrote:
> > Fair enough.  So how do I instead set a window's icon to a stock image?
> > Alternatively, how do I get a pixbuf from a stock image?
> 
> pxb = (gtk.Image.set_from_stock(stock_id, size)).get_pixbuf()
> 
> I cannot try right now but maybe this will work?

The way I understand the set_from_stock API to work, I have to write:
im = gtk.Image()
im.set_from_stock(gtk.STOCK_FIND, gtk.ICON_SIZE_MENU)
print im.get_storage_type()

and then I am in the same problem as before (get_storage_type yields
GTK_IMAGE_STOCK, I need GTK_IMAGE_PIXBUF) and get_pixbuf() fails.

Nigel.

_______________________________________________
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