[Xfce4-commits] [thunar-plugins/thunar-vcs-plugin] 01/09: Get rid of deprecated gdk_screen_make_display_name

noreply at xfce.org noreply at xfce.org
Sat Jun 2 05:09:35 CEST 2018


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

a   n   d   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 thunar-plugins/thunar-vcs-plugin.

commit 32feee686f1ab406ee7bc775c7419690b60c9a9c
Author: Andre Miranda <andreldm at xfce.org>
Date:   Fri Jun 1 19:33:27 2018 -0300

    Get rid of deprecated gdk_screen_make_display_name
---
 thunar-vcs-plugin/tvp-git-action.c | 9 +++++----
 thunar-vcs-plugin/tvp-svn-action.c | 9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/thunar-vcs-plugin/tvp-git-action.c b/thunar-vcs-plugin/tvp-git-action.c
index e94eff2..8a40f40 100644
--- a/thunar-vcs-plugin/tvp-git-action.c
+++ b/thunar-vcs-plugin/tvp-git-action.c
@@ -297,8 +297,9 @@ static void tvp_action_exec (ThunarxMenuItem *item, TvpGitAction *tvp_action)
     gchar *watch_path = NULL;
     gint pid;
     GError *error = NULL;
-    char *display = NULL;
+    char *display_name = NULL;
     GdkScreen *screen = gtk_window_get_screen (GTK_WINDOW (tvp_action->window));
+    GdkDisplay *display = gdk_screen_get_display (screen);
 
     iter = tvp_action->files;
 
@@ -366,9 +367,9 @@ static void tvp_action_exec (ThunarxMenuItem *item, TvpGitAction *tvp_action)
 
     pid = 0;
     if (screen != NULL)
-        display = gdk_screen_make_display_name (screen);
+        display_name = g_strdup (gdk_display_get_name (display));
 
-    if (!g_spawn_async (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, tvp_setup_display_cb, display, &pid, &error))
+    if (!g_spawn_async (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, tvp_setup_display_cb, display_name, &pid, &error))
     {
         GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (tvp_action->window), GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Could not spawn \'" TVP_GIT_HELPER "\'");
         gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s.", error->message);
@@ -381,7 +382,7 @@ static void tvp_action_exec (ThunarxMenuItem *item, TvpGitAction *tvp_action)
         g_signal_emit(tvp_action, action_signal[SIGNAL_NEW_PROCESS], 0, &pid, watch_path);
     }
 
-    g_free (display);
+    g_free (display_name);
     g_free (watch_path);
     g_strfreev (argv);
 }
diff --git a/thunar-vcs-plugin/tvp-svn-action.c b/thunar-vcs-plugin/tvp-svn-action.c
index b626201..f7a999e 100644
--- a/thunar-vcs-plugin/tvp-svn-action.c
+++ b/thunar-vcs-plugin/tvp-svn-action.c
@@ -452,8 +452,9 @@ static void tvp_action_exec (ThunarxMenuItem *item, TvpSvnAction *tvp_action)
   gchar *watch_path = NULL;
   gint pid;
   GError *error = NULL;
-  char *display = NULL;
+  char *display_name = NULL;
   GdkScreen *screen = gtk_window_get_screen (GTK_WINDOW (tvp_action->window));
+  GdkDisplay *display = gdk_screen_get_display (screen);
 
   iter = tvp_action->files;
 
@@ -521,9 +522,9 @@ static void tvp_action_exec (ThunarxMenuItem *item, TvpSvnAction *tvp_action)
 
   pid = 0;
   if (screen != NULL)
-    display = gdk_screen_make_display_name (screen);
+    display_name = g_strdup (gdk_display_get_name (display));
 
-  if (!g_spawn_async (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, tvp_setup_display_cb, display, &pid, &error))
+  if (!g_spawn_async (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, tvp_setup_display_cb, display_name, &pid, &error))
   {
     GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (tvp_action->window), GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Could not spawn \'" TVP_SVN_HELPER "\'");
     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s.", error->message);
@@ -536,7 +537,7 @@ static void tvp_action_exec (ThunarxMenuItem *item, TvpSvnAction *tvp_action)
     g_signal_emit(tvp_action, action_signal[SIGNAL_NEW_PROCESS], 0, &pid, watch_path);
   }
 
-  g_free (display);
+  g_free (display_name);
   g_free (watch_path);
   g_strfreev (argv);
 }

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


More information about the Xfce4-commits mailing list