diff options
author | ZenWalker <[email protected]> | 2017-08-02 01:01:14 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2017-08-02 01:01:14 +0200 |
commit | e3e2e8775f5509ce2bb60dedb28347b29404fd47 (patch) | |
tree | cccbf75e34ad06e6d83b59fd3884fad7deb1f967 /mate-panel/panel-run-dialog.c | |
parent | d5fa1884a1bcd93235f36b06bcc00a4c3646554d (diff) | |
download | mate-panel-e3e2e8775f5509ce2bb60dedb28347b29404fd47.tar.bz2 mate-panel-e3e2e8775f5509ce2bb60dedb28347b29404fd47.tar.xz |
avoid deprecated gdk_screen_make_display_name
Diffstat (limited to 'mate-panel/panel-run-dialog.c')
-rw-r--r-- | mate-panel/panel-run-dialog.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c index 500fcb62..e8962494 100644 --- a/mate-panel/panel-run-dialog.c +++ b/mate-panel/panel-run-dialog.c @@ -384,12 +384,13 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog, const char *command, const char *locale_command) { + GdkDisplay *display; GdkScreen *screen; gboolean result; GError *error = NULL; char **argv; int argc; - char *display; + char *display_name; GPid pid; if (!command_is_executable (locale_command, &argc, &argv)) @@ -400,14 +401,15 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog, if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->terminal_checkbox))) mate_desktop_prepend_terminal_to_vector (&argc, &argv); - display = gdk_screen_make_display_name (screen); + display = gdk_screen_get_display (screen); + display_name = g_strdup (gdk_display_get_name (display)); result = g_spawn_async (NULL, /* working directory */ argv, NULL, /* envp */ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, set_environment, - display, + display_name, &pid, &error); @@ -427,6 +429,7 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog, } g_strfreev (argv); + g_free (display_name); return result; } |