! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
API to get the comment from the desktop file
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-panel
Component:
Libxfce4panel

Comments

Description Mike Massonnet editbugs 2009-01-05 02:23:17 CET
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
Comment 1 Mike Massonnet editbugs 2009-01-05 02:25:57 CET
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 ;)
Comment 2 Nick Schermer editbugs 2009-01-05 08:21:26 CET
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().
Comment 3 Mike Massonnet editbugs 2009-01-05 13:20:56 CET
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
Comment 4 Mike Massonnet editbugs 2009-01-05 13:27:53 CET
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.
Comment 5 Nick Schermer editbugs 2009-03-19 14:11:06 CET
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));
Comment 6 Nick Schermer editbugs 2010-02-27 15:09:12 CET
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.

Bug #4775

Reported by:
Mike Massonnet
Reported on: 2009-01-05
Last modified on: 2010-02-27

People

Assignee:
Nick Schermer
CC List:
1 user

Version

Version:
Unspecified

Attachments

video showing the tooltips (68.23 KB, video/ogg)
2009-01-05 13:27 CET , Mike Massonnet
no flags

Additional information