When I have an image 'elephant.png' in /usr/share/icons/hicolor/64x64/apps,
"gtk.IconTheme().get_search_path()" gives
('/home/j/.icons', '/home/j/.local/share/icons', '/usr/share/gnome/icons',
'/usr/local/share/icons', '/usr/share/icons', '/usr/share/gnome/pixmaps',
'/usr/local/share/pixmaps', '/usr/share/pixmaps')
but "gtk.IconTheme().has_icon('elephant')" returns False. However, if I place
elephant.png in /usr/share/pixmaps, it returns True, and for a gtk.Window "w",
setting the icon using "w.set_icon(gtk.IconTheme().load_icon('elephant', 64,
0))" works.
gtk.Window.set_icon_name seems like it should be a shortcut for the above, but
"w.set_icon_name('elephant')" doesn't work with the image in either of the
mentioned paths. What's more, gtk.StatusIcon.set_icon_from_name _does_ work,
but again only if the image is in /usr/share/pixmaps.
Am I misunderstanding how this works, or is something going wrong? This is
using the python-gtk2 package from the Ubuntu repositories, listed as version
2.17.0-0ubuntu2.
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/