mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
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
This commit is contained in:
parent
537576e0b4
commit
9ed0abb510
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
2008-12-07 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Bug 559325 – documentation for gdk_display_get_window_at_pointer()
|
Bug 559325 – documentation for gdk_display_get_window_at_pointer()
|
||||||
|
@ -474,6 +474,26 @@ gtk_link_button_clicked (GtkButton *button)
|
|||||||
|
|
||||||
if (uri_func)
|
if (uri_func)
|
||||||
(* uri_func) (link_button, link_button->priv->uri, uri_func_data);
|
(* 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);
|
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
|
* a #GtkLinkButton. This function is called before every callback registered
|
||||||
* for the "clicked" signal.
|
* 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.
|
* Return value: the previously set hook function.
|
||||||
*
|
*
|
||||||
* Since: 2.10
|
* Since: 2.10
|
||||||
|
Loading…
Reference in New Issue
Block a user