4

I tried to create an AppIndicator using gtk.ImageMenuItems. Normally ImageMenuItems display the stock's item, but using Python AppIndicator no Icons in the menu are displayed at all. Is this a lacking feature ?

Here is my example code. Of course the indicator displays an icon but non of the menu entries:

exit_item = gtk.ImageMenuItem(stock_id=gtk.STOCK_QUIT)
exit_item.connect("activate", quit, None)
exit_item.show()
4

By default icons on menu entries are not displayed (you can change that somewhere in GConf/DConf). Use

exit_item.set_always_show_image(True)

to override this.

| improve this answer | |
  • Thank you Florian. I didn't know that this was disabled by default. This works fine. – TheGhost Jan 10 '12 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.