[gtk+] link button: Use gtk_show_uri_on_window
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] link button: Use gtk_show_uri_on_window
- Date: Wed, 13 Jul 2016 15:24:33 +0000 (UTC)
commit 793d5291d99fd0aa97b64e18db375baa180c37dd
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jul 13 11:23:47 2016 -0400
link button: Use gtk_show_uri_on_window
This gives slightly better behavior in the sandboxed case and
makes no difference otherwise.
gtk/gtklinkbutton.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index fe46867..1776d06 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -463,16 +463,13 @@ gtk_link_button_button_press (GtkWidget *widget,
static gboolean
gtk_link_button_activate_link (GtkLinkButton *link_button)
{
- GdkScreen *screen;
+ GtkWidget *toplevel;
GError *error;
- if (gtk_widget_has_screen (GTK_WIDGET (link_button)))
- screen = gtk_widget_get_screen (GTK_WIDGET (link_button));
- else
- screen = NULL;
+ toplevel = gtk_widget_get_toplevel (GTK_WIDGET (link_button));
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)
{
g_warning ("Unable to show '%s': %s",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]