That was really helpful method. I can now enable menu icons per. application.

So we have two methods to show icons in the menu items (in the GNOME desktop).

1) Set the global GNOME option in the Gconf.
Start gconf-editor and activate the "/desktop/gnome/interface/menus_have_icons" item.

2) Or activate menu icons per application by setting
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
window.get_settings().set_long_property('gtk-menu-images', True, '')

One thing though.
I added an icon-cache to speed up lookup and generation of icon-pixbufs. This is especially important in the long "show application windows" menu. This menu is totally dynamic. Ref: http://bildr.no/view/616349

The cache caches icons pr. (xlib) window id.

Icons are also very important in the "Open with..." menu.
People recognize applications by their icons. Ref: http://bildr.no/view/616704

Thanks.

// Moma Antero
   http:://www.futuredesktop.com (.org)

On 03/28/2010 04:39 AM, Neil Dugan wrote:
You can do
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
window.get_settings().set_long_property('gtk-menu-images', True, '')

_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to