! 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 !
tooltip not showing up
Status:
RESOLVED: FIXED
Product:
Xfce4-diskperf-plugin
Component:
General

Comments

Description andrea villa 2012-04-18 20:07:30 CEST
Created attachment 4340 
proposed fix for tooltip not showing

I'm working on xfce 4.10 pre, plugin release 2.5.1 straight from git, and tooltip is not working.

A patch to fix the bug is in attachment: it simply moves to the more up-to-date mechanics of tooltipping already implemented in netload plugin.
Comment 1 Harald Judt 2012-05-07 13:13:52 CEST
Created attachment 4403 
use-new-tooltip-api.patch

Thanks! I'm glad I found this, it saved me from writing it on my own. I have successfully tested it and detected no problems. It solves the problem that the tooltip doesn't show when the update interval is set to something less than 500ms. Most or all other panel plugins have already been updated to use the new GTK API.

My updated, reformatted and ready-to-apply version of your patch applies cleanly on current git, but would need the patch from bug #8845 too. However, I've left Andrea Villa as original author, I hope that's ok :-)
Comment 2 Landry Breuil editbugs 2012-05-07 13:42:20 CEST
I'm pretty sure we don't need a GtkLabel and manually connecting query-tooltip signal for that.. GtkTooltip is the way to go (see http://developer.gnome.org/gtk/2.24/GtkTooltip.html), probably just using gtk_widget_set_tooltip_text () on the wEventBox widget.
Comment 3 Harald Judt 2012-05-07 13:48:47 CEST
Ok, I'll try to work that out.
Comment 4 Harald Judt 2012-05-07 14:13:30 CEST
Created attachment 4405 
use-new-tooltip-api.patch

You're right gtk_widget_set_tooltip_text does all the previous patch did manually. Here's the updated version.
Comment 5 Harald Judt 2012-05-07 14:14:54 CEST
Comment on attachment 4403 
use-new-tooltip-api.patch

Obsleted by attachment #4405 .
Comment 6 Harald Judt 2012-05-07 15:47:22 CEST
I accidently tested this with the wrong patch file. In fact, attachment #4405  does not solve the problem with update intervals < 500ms. Sorry. I'll work on a new patch.
Comment 7 Harald Judt 2012-05-07 16:14:49 CEST
Comment on attachment 4403 
use-new-tooltip-api.patch

Not obsolete. For some reason, this works, while attachment #4405  does not, even if the docs say otherwise. The systemload plugin solves this with a label too, see http://git.xfce.org/panel-plugins/xfce4-systemload-plugin/commit/?id=016c155ccee3e305eaff1a539e0dfdab4f14c64c
Comment 8 Harald Judt 2012-05-07 16:15:52 CEST
Comment on attachment 4405 
use-new-tooltip-api.patch

Obsolete. Doesn't solve the bug with update intervals < 500ms. Please use attachment #4403  instead.
Comment 9 Landry Breuil editbugs 2012-05-08 14:21:57 CEST
(In reply to comment #8)
> Comment on attachment 4405 
> use-new-tooltip-api.patch
> 
> Obsolete. Doesn't solve the bug with update intervals < 500ms. Please use
> attachment #4403  instead.

Why not using something like in https://bugzilla.xfce.org/attachment.cgi?id=2264&action=diff instead of this hack ?
Comment 10 Landry Breuil editbugs 2012-05-08 14:25:02 CEST
Note that you already proposed this for systemload in https://bugzilla.xfce.org/show_bug.cgi?id=5865 and i'd rather go for that simpler and cleaner way...
Comment 11 Harald Judt 2012-05-08 14:31:35 CEST
Good example. Exactly because of that bug #5856. Apparently, it has been decided not to solve it my way: http://git.xfce.org/panel-plugins/xfce4-systemload-plugin/commit/?id=016c155ccee3e305eaff1a539e0dfdab4f14c64c

You see? So, which way to go?
Comment 12 Landry Breuil editbugs 2012-05-08 14:55:50 CEST
It looks simpler to update the tooltip timeout depending on the update interval. Florian, can you comment on it and why you decided to go the other way in systemload ? I'll fix all similar constructs but i just wonder if there was a particular reason to bother will all that label stuff instead of doing the simpler fix ?
Comment 13 Harald Judt 2012-05-08 15:43:59 CEST
Created attachment 4409 
use-new-tooltip-api-with-timeout-workaround.patch

However you decide, here's a version with timeout. Maybe that is better because the user can set a timeout *manually* in $HOME/.gtkrc-2.0, and this takes care that the tooltip timeout is always below the update interval. I really don't know.

To me, both solutions seem to be of about the same complexity.
Comment 14 Landry Breuil editbugs 2012-05-13 21:11:36 CEST
Finally applied last simpler patch in 986fd5f, thanks !

Bug #8730

Reported by:
andrea villa
Reported on: 2012-04-18
Last modified on: 2012-05-13

People

Assignee:
Landry Breuil
CC List:
2 users

Version

Attachments

Additional information