From 3b0718460046cdbd1fd33cb2a6f21ef2f4949052 Mon Sep 17 00:00:00 2001 From: Monsta Date: Mon, 23 Mar 2015 15:03:22 +0300 Subject: keybindings: pass screen name instead of number to error dialog makes error dialogs on wrong command/terminal command actually work, and fixes https://github.com/mate-desktop/marco/issues/150 Closes https://github.com/mate-desktop/marco/pull/185 Closes https://github.com/mate-desktop/marco/issues/150 --- src/core/keybindings.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/core/keybindings.c b/src/core/keybindings.c index 041d96fc..d40c90d7 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -2321,7 +2321,7 @@ static void error_on_command (int command_index, const char *command, const char *message, - int screen_number, + const char *screen_name, guint32 timestamp) { if (command_index < 0) @@ -2350,7 +2350,7 @@ error_on_command (int command_index, meta_show_dialog ("--error", text, NULL, - screen_number, + screen_name, NULL, NULL, 0, NULL, NULL); @@ -2362,7 +2362,7 @@ error_on_command (int command_index, meta_show_dialog ("--error", message, NULL, - screen_number, + screen_name, NULL, NULL, 0, NULL, NULL); } @@ -2433,7 +2433,7 @@ handle_run_command (MetaDisplay *display, s = g_strdup_printf (_("No command %d has been defined.\n"), which + 1); - error_on_command (which, NULL, s, screen->number, event->xkey.time); + error_on_command (which, NULL, s, screen->screen_name, event->xkey.time); g_free (s); return; @@ -2442,7 +2442,7 @@ handle_run_command (MetaDisplay *display, err = NULL; if (!meta_spawn_command_line_async_on_screen (command, screen, &err)) { - error_on_command (which, command, err->message, screen->number, event->xkey.time); + error_on_command (which, command, err->message, screen->screen_name, event->xkey.time); g_error_free (err); } @@ -3431,7 +3431,7 @@ handle_run_terminal (MetaDisplay *display, "keybinding press\n"); s = g_strdup_printf (_("No terminal command has been defined.\n")); - error_on_command (-1, NULL, s, screen->number, event->xkey.time); + error_on_command (-1, NULL, s, screen->screen_name, event->xkey.time); g_free (s); return; @@ -3440,7 +3440,7 @@ handle_run_terminal (MetaDisplay *display, err = NULL; if (!meta_spawn_command_line_async_on_screen (command, screen, &err)) { - error_on_command (-1, command, err->message, screen->number, + error_on_command (-1, command, err->message, screen->screen_name, event->xkey.time); g_error_free (err); -- cgit v1.2.1