From 16d37afdab1dc7736d2474300d350df54780f6d8 Mon Sep 17 00:00:00 2001 From: Denis Gorodnichev Date: Thu, 27 Feb 2014 17:53:02 +0400 Subject: gtk3: fix run application dialog --- mate-panel/panel-run-dialog.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'mate-panel/panel-run-dialog.c') diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c index 77d2ba38..01c35deb 100644 --- a/mate-panel/panel-run-dialog.c +++ b/mate-panel/panel-run-dialog.c @@ -360,17 +360,6 @@ dummy_child_watch (GPid pid, */ } -#if GTK_CHECK_VERSION (3, 0, 0) -/* - * Set the DISPLAY variable, to be use by g_spawn_async. - */ -static void -set_environment (gpointer display) -{ - g_setenv ("DISPLAY", display, TRUE); -} -#endif - static gboolean panel_run_dialog_launch_command (PanelRunDialog *dialog, const char *command, @@ -382,9 +371,6 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog, char **argv; int argc; GPid pid; -#if GTK_CHECK_VERSION (3, 0, 0) - char *display; -#endif if (!command_is_executable (locale_command, &argc, &argv)) return FALSE; @@ -395,18 +381,14 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog, mate_desktop_prepend_terminal_to_vector (&argc, &argv); #if GTK_CHECK_VERSION (3, 0, 0) - display = gdk_screen_make_display_name (screen); - result = g_spawn_async (NULL, /* working directory */ argv, NULL, /* envp */ G_SPAWN_SEARCH_PATH, - set_environment, - &display, NULL, + NULL, + &pid, &error); - - g_free (display); #else result = gdk_spawn_on_screen (screen, NULL, /* working directory */ -- cgit v1.2.1