After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 504456 - don't show empty tooltips
don't show empty tooltips
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-12-19 13:45 UTC by Christian Persch
Modified: 2008-08-04 21:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (697 bytes, patch)
2007-12-19 13:45 UTC, Christian Persch
none Details | Review

Description Christian Persch 2007-12-19 13:45:18 UTC
Steps:
0) gtk_widget_set_tooltip_text (widget, "");
1) Hover pointer over that widget

Actual results:
Tiny empty grey rectangle.

IMHO it would be better to not show the tooltip in this case, by making gtk_widget_set_tooltip_text handle "" like NULL.
Comment 1 Christian Persch 2007-12-19 13:45:32 UTC
Created attachment 101251 [details] [review]
proposed patch
Comment 2 Matthias Clasen 2007-12-19 18:28:00 UTC
Makes some sense to me. Kris ?
Comment 3 Björn Lindqvist 2008-03-22 04:38:12 UTC
Isn't that inconsistent with gtk_widget_set_tooltip_markup ("<b></b>") for example, that will still show an empty tooltip? 
Comment 4 Matthias Clasen 2008-05-26 01:48:46 UTC
Actually, I assume the main problem here is probably libglade / GtkBuilder having trouble to discriminate between "" and NULL. So maybe all we need is a patch to libglade and GtkBuilder to not set "" as a tooltip.
Comment 5 Christian Persch 2008-05-30 18:46:30 UTC
Since the old tooltips API doesn't show tooltips for "" and since empty tooltips aren't useful in any case, I think the new API should also not show them. This is just right, and also eases porting from the old API.
Comment 6 Kristian Rietveld 2008-06-04 08:25:33 UTC
(In reply to comment #2)
> Makes some sense to me. Kris ?

Don't have a really strong opinion here but I think it makes sense.  A patch should also handle the case that Bjorn brought up in c3.
Comment 7 Björn Lindqvist 2008-08-04 21:28:15 UTC
Apparently this was fixed in Bug 541399. So nothing more to do unless someone wants to fix the set_tooltip_markup case..