From fba62724adb71f01692e641c6b7c293b5d6150aa Mon Sep 17 00:00:00 2001 From: yetoo-desktop Date: Tue, 17 Jul 2018 12:36:43 -0700 Subject: [PATCH] interface: Allows Delete key to end processes The delete key now can end selected processes as Ctrl-E can while the menu entry displaying the Ctrl+E shortcut remains. The purpose of this is to allow convenience for those who are switching over from gnome-system-monitor or other process managers which allow the delete key to End selected processes. This was accomplished by adding an accelerator item with the delete key as the accelerator and putting the menu entry of the EndProcess_Del on top of the EndProcess menu entry so the latter shows over the former. Issue #101 --- src/interface.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/interface.cpp b/src/interface.cpp index e6617656..decc1bcf 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -66,8 +66,8 @@ static const GtkActionEntry menu_entries[] = { "EndProcess", NULL, N_("_End Process"), "E", N_("Force process to finish normally"), G_CALLBACK (cb_end_process) }, - { "KillProcess_Del", NULL, N_("_Kill Process"), "Delete", - N_("Force process to finish immediately"), G_CALLBACK (cb_kill_process) }, + { "EndProcess_Del", NULL, N_("_End Process"), "Delete", + N_("Force process to finish normally"), G_CALLBACK (cb_end_process) }, { "KillProcess", NULL, N_("_Kill Process"), "K", N_("Force process to finish immediately"), G_CALLBACK (cb_kill_process) }, { "ChangePriority", NULL, N_("_Change Priority"), NULL, @@ -138,8 +138,8 @@ static const char ui_info[] = " " " " " " + " " " " - " " " " " " " " @@ -178,7 +178,7 @@ static const char ui_info[] = " " " " " " - " " + " " " " " " " " @@ -784,7 +784,7 @@ update_sensitivity(ProcData *data) const char * const selected_actions[] = { "StopProcess", "ContProcess", "EndProcess", - "KillProcess_Del" + "EndProcess_Del", "KillProcess", "ChangePriority", "MemoryMaps",