mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-16 21:50:34 +00:00
link button: Use gtk_show_uri_on_window
This gives slightly better behavior in the sandboxed case and makes no difference otherwise.
This commit is contained in:
parent
6184edc318
commit
793d5291d9
@ -463,16 +463,13 @@ gtk_link_button_button_press (GtkWidget *widget,
|
|||||||
static gboolean
|
static gboolean
|
||||||
gtk_link_button_activate_link (GtkLinkButton *link_button)
|
gtk_link_button_activate_link (GtkLinkButton *link_button)
|
||||||
{
|
{
|
||||||
GdkScreen *screen;
|
GtkWidget *toplevel;
|
||||||
GError *error;
|
GError *error;
|
||||||
|
|
||||||
if (gtk_widget_has_screen (GTK_WIDGET (link_button)))
|
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (link_button));
|
||||||
screen = gtk_widget_get_screen (GTK_WIDGET (link_button));
|
|
||||||
else
|
|
||||||
screen = NULL;
|
|
||||||
|
|
||||||
error = NULL;
|
error = NULL;
|
||||||
gtk_show_uri (screen, link_button->priv->uri, GDK_CURRENT_TIME, &error);
|
gtk_show_uri_on_window (GTK_WINDOW (toplevel), link_button->priv->uri, GDK_CURRENT_TIME, &error);
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
g_warning ("Unable to show '%s': %s",
|
g_warning ("Unable to show '%s': %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user