2

I am using Ubuntu 13.04 with Unity.

I created an Application Indicator using the AppIndicator class in Python, with a gtk.Menu attached to it. The menu is showing some status information about GIT repositories that I don't want to be updated as long as the menu is not visible. Instead, when the user clicks on the AppIndicator and the menu becomes visible, I would like to get notified and update the information shown.

So far, I could not find a signal emitted by the Menu whenver it pops up. Nor does the AppIndicator have a signal emitted when it gets clicked. In fact, there is already this question but the answers only discuss if AppIndicator has (or should have) the appropriate signal. But what about the gtk.Menu itself?

So, my question is, how can I get notified that my menu becomes visible?

Community
  • 1
  • 1
Konstantin
  • 2,451
  • 1
  • 24
  • 26
  • Looks like they insist not to allow you change the contents of appindicator popup menu dynamically. You can get notified when menu is shown, but then it's too late to change the items. Although you can probably change the contents of *submenus* using *activate* signal of menu items. – saeedgnu Jul 11 '15 at 11:05

1 Answers1

0

This question is to old to go into details but if you still interested you can monitor the DBus system in ubuntu so you can catch when the call is done to you menu, you can even track submenu if you are into that.

Chop Labalagun
  • 592
  • 1
  • 6
  • 19