diff options
author | Monsta <[email protected]> | 2015-03-23 15:03:22 +0300 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2015-04-05 18:51:22 +0200 |
commit | 3b0718460046cdbd1fd33cb2a6f21ef2f4949052 (patch) | |
tree | 0d02e82390cd69b40cc46b8f7e3ce6e82dfdc306 /src | |
parent | 6cc333ef29fc0ec9f2d874eb91113af52caa4956 (diff) | |
download | marco-3b0718460046cdbd1fd33cb2a6f21ef2f4949052.tar.bz2 marco-3b0718460046cdbd1fd33cb2a6f21ef2f4949052.tar.xz |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/core/keybindings.c | 14 |
1 files changed, 7 insertions, 7 deletions
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); |