[Xfce4-commits] [xfce/exo] 01/01: Replace deprecated gdk_screen_make_display_name

noreply at xfce.org noreply at xfce.org
Mon Jul 3 03:36:33 CEST 2017


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/exo.

commit ae5807267b97ef395d9bc6def13b5f23fdb5015e
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Jul 2 21:36:11 2017 -0400

    Replace deprecated gdk_screen_make_display_name
---
 exo-helper/exo-helper.c | 10 ++++++----
 exo/exo-execute.c       | 16 +++++++++-------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/exo-helper/exo-helper.c b/exo-helper/exo-helper.c
index ad3561a..6bfd202 100644
--- a/exo-helper/exo-helper.c
+++ b/exo-helper/exo-helper.c
@@ -353,12 +353,13 @@ exo_helper_execute (ExoHelper   *helper,
 {
   GTimeVal      previous;
   GTimeVal      current;
+  GdkDisplay   *display;
   gboolean      succeed = FALSE;
   GError       *err = NULL;
   gchar       **commands;
   gchar       **argv;
   gchar        *command;
-  gchar        *display;
+  gchar        *display_name;
   guint         n;
   gint          status;
   gint          result;
@@ -405,7 +406,8 @@ exo_helper_execute (ExoHelper   *helper,
         continue;
 
       /* set the display variable */
-      display = gdk_screen_make_display_name (screen);
+      display = gdk_screen_get_display (screen);
+      display_name = g_strdup (gdk_display_get_name (display));
 
       /* try to run the command */
       succeed = g_spawn_async (NULL,
@@ -413,13 +415,13 @@ exo_helper_execute (ExoHelper   *helper,
         NULL,
         G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
         (GSpawnChildSetupFunc) set_environment,
-        display,
+        display_name,
         &pid,
         &err);
 
       /* cleanup */
       g_strfreev (argv);
-      g_free (display);
+      g_free (display_name);
 
       /* check if the execution was successful */
       if (G_LIKELY (succeed))
diff --git a/exo/exo-execute.c b/exo/exo-execute.c
index c7a756c..3ef7048 100644
--- a/exo/exo-execute.c
+++ b/exo/exo-execute.c
@@ -128,10 +128,11 @@ exo_execute_preferred_application_on_screen (const gchar *category,
                                              GdkScreen   *screen,
                                              GError     **error)
 {
-  gchar   *argv[5];
-  gchar   *display;
-  gint     argc = 0;
-  gboolean success;
+  GdkDisplay *display;
+  gchar      *argv[5];
+  gchar      *display_name;
+  gint        argc = 0;
+  gboolean    success;
 
   g_return_val_if_fail (category != NULL, FALSE);
   g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
@@ -150,7 +151,8 @@ exo_execute_preferred_application_on_screen (const gchar *category,
   argv[argc] = NULL;
 
   /* set the display environment variable */
-  display = gdk_screen_make_display_name (screen);
+  display = gdk_screen_get_display (screen);
+  display_name = g_strdup (gdk_display_get_name (display));
 
   /* launch the command */
   success = g_spawn_async (working_directory,
@@ -158,11 +160,11 @@ exo_execute_preferred_application_on_screen (const gchar *category,
     envp,
     0,
     (GSpawnChildSetupFunc) set_environment,
-    display,
+    display_name,
     NULL,
     error);
 
-  g_free (display);
+  g_free (display_name);
   return success;
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list