From fb1332ed3c47b2aa72a233fcc48422ec027a82d0 Mon Sep 17 00:00:00 2001 From: Andre Miranda <andreldm@xfce.org> Date: Sat, 2 Jun 2018 01:30:45 -0300 Subject: [PATCH] Replace gtk_show_uri by gtk_show_uri_on_window --- thunar/thunar-renamer-dialog.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/thunar/thunar-renamer-dialog.c b/thunar/thunar-renamer-dialog.c index 1bb0b16e6..562de91fd 100644 --- a/thunar/thunar-renamer-dialog.c +++ b/thunar/thunar-renamer-dialog.c @@ -913,8 +913,9 @@ thunar_renamer_dialog_help (ThunarRenamerDialog *renamer_dialog) { ThunarxRenamer *renamer; const gchar *help_url = NULL; - GdkScreen *screen; GError *error = NULL; + gboolean uri_launched = FALSE; + _thunar_return_if_fail (THUNAR_IS_RENAMER_DIALOG (renamer_dialog)); @@ -932,11 +933,13 @@ thunar_renamer_dialog_help (ThunarRenamerDialog *renamer_dialog) } else { - /* determine the dialog's screen */ - screen = gtk_widget_get_screen (GTK_WIDGET (renamer_dialog)); - /* try to launch the specific URL */ - if (!gtk_show_uri (screen, help_url, gtk_get_current_event_time (), &error)) + uri_launched = gtk_show_uri_on_window (GTK_WINDOW (renamer_dialog), + help_url, + gtk_get_current_event_time (), + &error); + + if (!uri_launched) { /* tell the user that we failed */ thunar_dialogs_show_error (GTK_WIDGET (renamer_dialog), error, _("Failed to open the documentation browser")); -- GitLab