moses-palmer / pystray

GNU General Public License v3.0
461 stars 57 forks source link

Feature Request: More Events and Actions #166

Open derDere opened 3 weeks ago

derDere commented 3 weeks ago

I hope I'm not missing on some features but I looked everywhere for those an I couldn't find what I need. So I hope you could implement these new features in the future to allow me to further improve.

1. Open the menu from code behind I need a way to open the Menu on my own. something line icon.menu.open() or maybe just add a setter to the visibility icon.menu.visible = True so we can actively open the menu if we need to.

2. Events/Callbacks for Menu behavior I would like to update some texts or log some actions if the menu is opened. A callback or a virtual function within the menu class for example on_menu_open, on_menu_close, on_menu_opened, on_menu_closed maybe with a boolean result to actively cancel the action in needed.