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=/branches/gtk-2-14/; revision=21729
This commit is contained in:
Christian Dywan
2008-10-30 09:10:30 +00:00
parent 89e5ad5197
commit 76b8be3ec1
2 changed files with 9 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2008-10-30 set REAL_NAME environment variable <kalikiana@gyokuro>
reviewed by: <delete if not using a buddy>
* gtk/gtklinkbutton.c (gtk_link_button_query_tooltip_cb):
2008-10-27 Richard Hult <richard@imendio.com>
Merged from trunk:

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;