Commit 9ed0abb5 authored by Matthias Clasen's avatar Matthias Clasen

Call gtk_show_uri() if no uri hook has been set. Patch by Emmanuele Bassi

        * gtk/gtklinkbutton.c: Call gtk_show_uri() if no uri hook has
        been set. Patch by Emmanuele Bassi


svn path=/trunk/; revision=21853
parent 537576e0
2008-12-07 Matthias Clasen <mclasen@redhat.com>
Bug 554274 – Add default hook for GtkLinkButton
* gtk/gtklinkbutton.c: Call gtk_show_uri() if no uri hook has
been set. Patch by Emmanuele Bassi
2008-12-07 Matthias Clasen <mclasen@redhat.com>
Bug 559325 – documentation for gdk_display_get_window_at_pointer()
......
......@@ -474,6 +474,26 @@ gtk_link_button_clicked (GtkButton *button)
if (uri_func)
(* uri_func) (link_button, link_button->priv->uri, uri_func_data);
else
{
GdkScreen *screen;
GError *error;
if (gtk_widget_has_screen (GTK_WIDGET (button)));
screen = gtk_widget_get_screen (GTK_WIDGET (button));
else
screen = NULL;
error = NULL;
gtk_show_uri (screen, link_button->priv->uri, GDK_CURRENT_TIME, &error);
if (error)
{
g_warning ("Unable to show '%s': %s",
link_button->priv->uri,
error->message);
g_error_free (error);
}
}
gtk_link_button_set_visited (link_button, TRUE);
}
......@@ -690,6 +710,8 @@ gtk_link_button_get_uri (GtkLinkButton *link_button)
* a #GtkLinkButton. This function is called before every callback registered
* for the "clicked" signal.
*
* If no uri hook has been set, GTK+ defaults to calling gtk_show_uri().
*
* Return value: the previously set hook function.
*
* Since: 2.10
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment