[Webkit-unassigned] [Bug 32819] [GTK] Change the tooltip implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 7 17:04:01 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=32819


Gustavo Noronha (kov) <gns at gnome.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #45378|review?                     |review-
               Flag|                            |




--- Comment #5 from Gustavo Noronha (kov) <gns at gnome.org>  2010-01-07 17:04:00 PST ---
(From update of attachment 45378)
> +#if GTK_CHECK_VERSION(2, 12, 0)
> +    priv->tooltipText = 0;
> +    gtk_widget_set_has_tooltip(GTK_WIDGET(webView), TRUE);
> +    g_signal_connect(webView, "query-tooltip", G_CALLBACK(webkit_web_view_query_tooltip), 0);
> +#endif

You should override the GtkWidget class method instead of connecting to the
signal.

> +void webkit_web_view_set_tooltip_text(WebKitWebView* webView, const char* tooltip)
> +{
> +    WebKitWebViewPrivate* priv = webView->priv;
> +    g_free(priv->tooltipText);
> +    if (tooltip && *tooltip != '\0')
> +        priv->tooltipText = g_strdup(tooltip);
> +    else
> +        priv->tooltipText = 0;
> +}

What about the 'has-tooltip' property? You should probably set it to
TRUE/FALSE, as appropriate, here. Otherwise the tooltips will only be displayed
when the webview has keyboard focus, as I understand it. The patch looks
awesome otherwise, nice work!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list