[Xfce4-commits] <xfce4-clipman-plugin:master> Replace gdk_spawn against g_spawn

Mike Massonnet noreply at xfce.org
Thu Oct 20 11:42:09 CEST 2011


Updating branch refs/heads/master
         to 5b38c4ee7b44682949b11f5ba3dcb4da6c98624a (commit)
       from a21833e6eb4e942d6eec5b52efb8309d2f42c048 (commit)

commit 5b38c4ee7b44682949b11f5ba3dcb4da6c98624a
Author: Mike Massonnet <mmassonnet at xfce.org>
Date:   Thu Oct 20 00:20:31 2011 +0200

    Replace gdk_spawn against g_spawn

 panel-plugin/actions.c                |    3 ++-
 panel-plugin/plugin.c                 |    2 +-
 panel-plugin/xfce4-clipman-settings.c |    7 ++-----
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/panel-plugin/actions.c b/panel-plugin/actions.c
index 06da812..a01fb35 100644
--- a/panel-plugin/actions.c
+++ b/panel-plugin/actions.c
@@ -350,7 +350,8 @@ cb_entry_activated (GtkMenuItem *mi,
 
   DBG ("Execute command `%s'", real_command);
 
-  if (!gdk_spawn_command_line_on_screen (NULL, real_command, &error))
+  g_spawn_command_line_async (real_command, &error);
+  if (error != NULL)
     {
       xfce_dialog_show_error (NULL, error, _("Unable to execute the command \"%s\"\n\n%s"), real_command, error->message);
       g_error_free (error);
diff --git a/panel-plugin/plugin.c b/panel-plugin/plugin.c
index 64132e1..12c9d4d 100644
--- a/panel-plugin/plugin.c
+++ b/panel-plugin/plugin.c
@@ -349,7 +349,7 @@ plugin_configure (MyPlugin *plugin)
   GError *error = NULL;
   GtkWidget *error_dialog;
 
-  gdk_spawn_command_line_on_screen (gdk_screen_get_default (), "xfce4-clipman-settings", &error);
+  g_spawn_command_line_async ("xfce4-clipman-settings", &error);
   if (error != NULL)
   {
     error_dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
diff --git a/panel-plugin/xfce4-clipman-settings.c b/panel-plugin/xfce4-clipman-settings.c
index a9958c9..d796d57 100644
--- a/panel-plugin/xfce4-clipman-settings.c
+++ b/panel-plugin/xfce4-clipman-settings.c
@@ -165,7 +165,6 @@ prop_dialog_run (void)
 static void
 cb_show_help (GtkButton *button)
 {
-  GdkScreen *screen;
   gchar *locale = NULL;
   gchar *offset;
   gchar *filename = NULL;
@@ -213,15 +212,13 @@ cb_show_help (GtkButton *button)
   filename = g_strdup ("file://"DATAROOTDIR"/xfce4/doc/C/"PACKAGE".html");
 #endif
 
-  screen = gtk_widget_get_screen (GTK_WIDGET (button));
-
   command = g_strdup_printf ("exo-open --launch WebBrowser %s", filename);
-  if (gdk_spawn_command_line_on_screen (screen, command, NULL))
+  if (g_spawn_command_line_async (command, NULL))
     goto out;
 
   g_free (command);
   command = g_strdup_printf ("firefox %s", filename);
-  if (gdk_spawn_command_line_on_screen (screen, command, NULL))
+  if (g_spawn_command_line_async (command, NULL))
     goto out;
 
   xfce_dialog_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))),


More information about the Xfce4-commits mailing list