pythonpygtkgraphical-logoabout-box

How to set icon in gtk.AboutDialog on Windows?


I have an about dialog in my Python application and I want to set a custom icon for the dialog.

I looked at set_logo_icon_name(), but that doesn't accept an absolute path to an image.

What can I do to insert my custom icon?


Solution

  • Use set_logo() instead. set_logo_icon_name() is for named (i.e., themed) icons. set_logo() takes a gtk.gdk.Pixbuf which you can create from an absolute image path with gtk.gdk.pixbuf_new_from_file().