I am currently using the same texts as from the desktop file to provide a tooltip for the panel plugin, in the same way it is displayed by the launcher plugin (icon, title, description). Now I'm thinking about using the xfce_panel_plugin_get_display_name function, so I can change the string in one place and not both. But there is no function to get the description, yet :) This makes me also think that it can be nice to have a xfce_panel_plugin function to set the tooltip automatically for the toplevel widget. Or even set it always inside from the panel core, but then I'm not sure, but I think if the developer of the plugin sets another tooltip over a widget, the latter (his) should be displayed, and not both or something weird. My 2 little
PS, most probably a bad idea to set the tooltip always, as it would look weird for the pager, the separators, etc. xfce_panel_plugin_use_default_tooltip () might be convenient instead. Hope you like the idea ;)
A tooltip function is not really needed, just 1 line of code and you probably know what the plugin does without the tooltip. So I will leave this bug open for xfce_panel_plugin_get_comment().
So my answer will be off-topic. My idea is to have a wrapper function that will build a default tooltip, it's like 20 lines of code. Almost all plugins atm display a simple tooltip with the title, so right now the launcher is the only plugin with a fancy tooltip. It just looks a little weird to jump from fancy tooltips to single text tooltips while you browse them with the mouse. This could only welcome plugin writers to use a common tooltip, and give some eye candy to the end-user, even if I know some of the end-users hate such tooltips (: After all we are no more in the beginning of the 90's. But if you think this is overrated, plugin writers can still borrow code from other plugin writers. @Diego, I CC you to perhaps make some movement in the unfinished wiki page "consistents in the panel plugins", hope you like the idea. For reference, I made a change to a plugin, that can be seen here: http://git.xfce.org/mmassonnet/xfce4-gvfs-mount/commit/?id=cff1592185553fc74c46e232c59867be2ddaea60
Created attachment 2069 video showing the tooltips From left to right, one launcher, a gvfs plugin with a fancy tooltip, the places plugin, two launchers.
I'll add this to the plugin api: const gchar *xfce_panel_plugin_get_comment (XfcePanelPlugin *plugin); Default tooltips is not a good idea and imho it's up to the plugin developers to fix the weird tooltips. A default tooltip api is not a good idea, this is more flexible and this is doable: gtk_widget_set_tooltip_text (GTK_WIDGET (plugin), xfce_panel_plugin_get_comment (plugin));
Devel branch has been merged in master. A 4.7.0 release will follow soon. If you think this bug is not fixed? Feel free to reopen the bug.