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

前端 未结 2 1290
太阳男子
太阳男子 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条回答
  •  萌比男神i
    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.

提交回复
热议问题