[nautilus] general: use gtk_show_uri_on_window ()



commit 843b356a845f81369777223990094008c28b6108
Author: Ernestas Kulik <ernestask src gnome org>
Date:   Wed Feb 22 18:09:03 2017 +0200

    general: use gtk_show_uri_on_window ()
    
    gtk_show_uri () has been deprecated. This commit makes the code make use
    of the recommended API instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779083

 src/nautilus-application.c           |    7 ++-----
 src/nautilus-shell-search-provider.c |    2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 341d435..f88c7e6 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -775,11 +775,8 @@ action_help (GSimpleAction *action,
     GError *error = NULL;
 
     window = gtk_application_get_active_window (application);
-    gtk_show_uri (window ?
-                  gtk_window_get_screen (GTK_WINDOW (window)) :
-                  gdk_screen_get_default (),
-                  "help:gnome-help/files",
-                  gtk_get_current_event_time (), &error);
+    gtk_show_uri_on_window (window, "help:gnome-help/files",
+                            gtk_get_current_event_time (), &error);
 
     if (error)
     {
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
index f91f864..7c05f24 100644
--- a/src/nautilus-shell-search-provider.c
+++ b/src/nautilus-shell-search-provider.c
@@ -690,7 +690,7 @@ handle_activate_result (NautilusShellSearchProvider2  *skeleton,
     gboolean res;
     GFile *file;
 
-    res = gtk_show_uri (NULL, result, timestamp, NULL);
+    res = gtk_show_uri_on_window (NULL, result, timestamp, NULL);
 
     if (!res)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]