qdot / systray-rs

Allows rust applications to show a platform specific system tray icon and menu.
BSD 3-Clause "New" or "Revised" License
171 stars 66 forks source link

Figure out systray icon tooltip on linux #15

Open qdot opened 7 years ago

qdot commented 7 years ago

I'm not real sure how to set a tooltip for the systray icon itself on linux/gtk. libappnotifcation had many threads fighting about this in 2010-2011, then silence. I'm not sure if other projects are using a combination of GtkStatusIcon and libappindicator or what. Looked at the Parcellite source code and it wasn't a ton of help.

jonhoo commented 7 years ago

The Go implementation of gtk just uses gtk_status_icon_set_tooltip_text both for gtk2 and gtk3. Unfortunately it seems gtk_status_icon_set_tooltip_text is deprecated since gtk 3.14. After that, it seems they're using gtk_entry_set_icon_tooltip_text instead.

qdot commented 7 years ago

... I have no idea why I didn't see that in go's systray. That should work for us, will get it implemented for the linux core branch before merge.

jonhoo commented 7 years ago

@qdot Any progress on this? I'd really like linux-core to be merged so that I can stop using systray as a git dependency :)

qdot commented 7 years ago

@jonhoo Oh, uh, wow, sorry. I am easily distractable, heh.

Are you using linux-core right now? I think most of the reason that branch was there was because of the gtk-sys api exposure stuff, which did finally get worked out. Assuming that's the case, I can go ahead and merge the branch at least so we can get it into crates.io, call that v0.2, and boot this to v0.3.

jonhoo commented 7 years ago

Hehe, no worries! I know what that's like. Yes, I'm using linux-core for buzz, essentially because I'm only running it on Linux at the moment. Merging and then dealing with tooltip text in 0.3 seems perfectly reasonable!