Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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()
share|improve this question
up vote 4 down vote accepted

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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