-
Notifications
You must be signed in to change notification settings - Fork 119
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
statusicon-qt: Set proper tooltip #147
statusicon-qt: Set proper tooltip #147
Conversation
@jlindgren90: Why is the |
"title change" is for streaming when the title changes mid-stream. To get the initial title you can use "playback ready" (if memory serves). |
ea8da23
to
61000d5
Compare
Thanks, updated accordingly. One more question: I wonder if there is a difference regarding number of memory allocations and preventing memory leaks between these options. Which would you choose? const char * title = aud_drct_get_title ();
tray->setToolTip (title); String title = aud_drct_get_title ();
tray->setToolTip ((const char *) title); String title = aud_drct_get_title ();
tray->setToolTip (QString (title)); |
The first one is unsafe since the String will go out of scope too early (leaving a dangling pointer). The last two are equivalent so either one is fine. |
Thanks for working on this. Have you checked how this works with a panel/desktop environment supporting only XEmbed? Do we end up showing a double tooltip/info popup in that case? |
61000d5
to
ddd3bcd
Compare
I have tested it with Xfce and GNOME. Xfce has shown a tooltip also before ("Audacious") which is rather useless. GNOME with this extension neither shows a tooltip nor the info popup. Next week I can test how macOS behaves. Which panel / DE do you use? Could you please test it yourself too? |
@bpanca05: In your bug report I have seen you use KDE and also enabled the status icon plugin. Could you please answer my questions and try the patch from this pull request?
Thanks for feedback. |
This seems to fix the double-tooltip issue:
|
Even though we override the QSystemTrayIcon::event() method, it is never called by Qt (at least on Linux when the panel/DE supports StatusNotifierItem). Therefore our custom info popup is not shown. Set a proper tooltip as workaround.
ddd3bcd
to
03ce2a3
Compare
Thanks John for testing and the double tooltip fix. Meanwhile I have tried it on macOS where the tooltip is shown now. Happy New Year! 🎆 |
3415689
into
audacious-media-player:master
Sorry for the late response.
|
Even though we override the QSystemTrayIcon::event() method,
it is never called by Qt (at least on Linux when the panel/DE
supports StatusNotifierItem). Therefore our custom info popup
is not shown. Set a proper tooltip as workaround.