-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for icon tooltip and "Double-click" event #49
Comments
+1 for double-click support. I know you want to keep this library as uniform as possible, but double-clicking a tray icon is a very common need. Seems it's only Linux that does not support double-clicking the tray icons. Most Windows programs with a tray icon have no action for single-left-click but a special action for double-left-click - e.g. bringing something to the foreground, or executing some other default action. And Windows support for this would be really trivial, e.g.
|
Made a function that Shows tkinter window when tray icon is double clicked. You can call the function using Thread which will show and hide/destroy Tkinter main window when clicking menu buttons or double clicking the icon.
|
You do not need to add this double-click behavior in pystray.
|
Julien, useful, can you please provide a full code example. Thanks |
Win32PystrayIcon is used in case of win32 sys platform.
|
thats very useful, thank you |
I understand the wish to keep this library portable across OS. But, I need to handle the click into the notification Window. If the notification message is showed to the user and him click into the notification, I want to trigger a action. In my case it'll be start the default browser to show a URL content (The log entry URL). Does anybody have a ideal about where I should change the code? That would be if the OS is MS-Windows only! |
Hello,
Thanks for this outstanding work, this is a nice cross-platform and lightweight package,
I was looking for a lightweight systray that can work with tkinter and yours was my first choice until i found something in documentation says that pystray must run from main loop, then i decided to use "infi.systray" which supports windows only, everything works on windows flawlessly no issues,
Then i tried to find a way to run your pystray from a thread, and finally it did work "I didn't know before that main thread is the requirement for mac only", and i have to create menu and run icon from same thread.
everything works well with pystray on windows, however i miss 2 features:
1- set/update tooltip, in infi.systray i can use
systray.update(hover_text='my tooltip')
2- Double-click
which, I hope you could add support for both.
here is an example code, where I run Icon from a thread "not worry about mac support right now"
The text was updated successfully, but these errors were encountered: