From 1bb2f34586f78697713e38681402f7099bc87078 Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 18 Sep 2015 14:47:15 +0200 Subject: Revert "Remove unused function handle_run_terminal" This reverts commit 437b085f123f3c019bca2481000e936ee87e7c31. --- src/core/keybindings.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src/core/keybindings.c') diff --git a/src/core/keybindings.c b/src/core/keybindings.c index 73966a80..9e602a91 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -3421,3 +3421,40 @@ meta_set_keybindings_disabled (gboolean setting) meta_topic (META_DEBUG_KEYBINDINGS, "Keybindings %s\n", all_bindings_disabled ? "disabled" : "enabled"); } + +static void +handle_run_terminal (MetaDisplay *display, + MetaScreen *screen, + MetaWindow *window, + XEvent *event, + MetaKeyBinding *binding) +{ + const char *command; + GError *err; + + command = meta_prefs_get_terminal_command (); + + if (command == NULL) + { + char *s; + + meta_topic (META_DEBUG_KEYBINDINGS, + "No terminal command to run in response to " + "keybinding press\n"); + + s = g_strdup_printf (_("No terminal command has been defined.\n")); + error_on_command (-1, NULL, s, screen->screen_name, event->xkey.time); + g_free (s); + + return; + } + + err = NULL; + if (!meta_spawn_command_line_async_on_screen (command, screen, &err)) + { + error_on_command (-1, command, err->message, screen->screen_name, + event->xkey.time); + + g_error_free (err); + } +} -- cgit v1.2.1