GNOME Bugzilla – Bug 504456
don't show empty tooltips
Last modified: 2008-08-04 21:28:15 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.
Created attachment 101251 [details] [review] proposed patch
Makes some sense to me. Kris ?
Isn't that inconsistent with gtk_widget_set_tooltip_markup ("<b></b>") for example, that will still show an empty tooltip?
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.
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.
(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.
Apparently this was fixed in Bug 541399. So nothing more to do unless someone wants to fix the set_tooltip_markup case..