Bug 557316 – GtkLinkButton should consider user-defined tooltip

* gtk/gtklinkbutton.c (gtk_link_button_query_tooltip_cb):
Only override the tooltip if not previously set

svn path=/trunk/; revision=21728
This commit is contained in:
Christian Dywan 2008-10-30 08:49:18 +00:00
parent 040865e7e8
commit 0a91e7600e
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2008-10-30 Christian Dywan <christian@imendio.com>
Bug 557316 GtkLinkButton should consider user-defined tooltip
* gtk/gtklinkbutton.c (gtk_link_button_query_tooltip_cb):
Only override the tooltip if not previously set
2008-10-29 Christian Dywan <christian@imendio.com>
Bug 557762 Misleading error message in GDK DirectFB

View File

@ -620,7 +620,9 @@ gtk_link_button_query_tooltip_cb (GtkWidget *widget,
label = gtk_button_get_label (GTK_BUTTON (link_button));
uri = link_button->priv->uri;
if (label && *label != '\0' && uri && strcmp (label, uri) != 0)
if (!gtk_widget_get_tooltip_text (widget)
&& !gtk_widget_get_tooltip_markup (widget)
&& label && *label != '\0' && uri && strcmp (label, uri) != 0)
{
gtk_tooltip_set_text (tooltip, uri);
return TRUE;