Python AppIndicator bindings -> howto check if the menu is open?

前端 未结 2 1288
太阳男子
太阳男子 2021-02-19 02:42

Here is a minimal example of an AppIndicator:

#!/usr/bin/python

import gobject
import gtk
import appindicator

if __name__ == \"__main__\":
    ind = appindicat         


        
相关标签:
2条回答
  • 2021-02-19 03:28

    It looks like the answer is no unfortunately.

    print gobject.signal_list_names(ind)
    ('new-icon', 'new-attention-icon', 'new-status', 'new-label', 'x-ayatana-new-label', 'connection-changed', 'new-icon-theme-path')
    

    I tried all of them and none of them appear to activate when the indicator is clicked. For what it's worth the unity devs seem to want to keep all indicators behaving in a uniform way, so it's quite possible that it's deliberately limited.

    0 讨论(0)
  • 2021-02-19 03:39

    There is a bug filed about it on Launchpad https://bugs.launchpad.net/screenlets/+bug/522152

    Notice that "activate" signal is available for AppIndicator submenus.

    0 讨论(0)
提交回复
热议问题