Skip to content

Commit

Permalink
interface: Allows Delete key to end processes
Browse files Browse the repository at this point in the history
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 mate-desktop#101
  • Loading branch information
Yetoo1 committed Jul 17, 2018
1 parent 3f464cb commit fba6272
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ static const GtkActionEntry menu_entries[] =

{ "EndProcess", NULL, N_("_End Process"), "<control>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"), "<control>K",
N_("Force process to finish immediately"), G_CALLBACK (cb_kill_process) },
{ "ChangePriority", NULL, N_("_Change Priority"), NULL,
Expand Down Expand Up @@ -138,8 +138,8 @@ static const char ui_info[] =
" <menuitem name=\"EditStopProcessMenu\" action=\"StopProcess\" />"
" <menuitem name=\"EditContProcessMenu\" action=\"ContProcess\" />"
" <separator />"
" <menuitem name=\"EditEndProcessMenu\" action=\"EndProcess_Del\" />"
" <menuitem name=\"EditEndProcessMenu\" action=\"EndProcess\" />"
" <menuitem name=\"EditKillProcessMenu\" action=\"KillProcess_Del\" />"
" <menuitem name=\"EditKillProcessMenu\" action=\"KillProcess\" />"
" <separator />"
" <menu name=\"EditChangePriorityMenu\" action=\"ChangePriority\" >"
Expand Down Expand Up @@ -178,7 +178,7 @@ static const char ui_info[] =
" <menuitem action=\"ContProcess\" />"
" <separator />"
" <menuitem action=\"EndProcess\" />"
" <menuitem action=\"KillProcess_Del\" />"
" <menuitem action=\"EndProcess_Del\" />"
" <menuitem action=\"KillProcess\" />"
" <separator />"
" <menu name=\"ChangePriorityMenu\" action=\"ChangePriority\" >"
Expand Down Expand Up @@ -784,7 +784,7 @@ update_sensitivity(ProcData *data)
const char * const selected_actions[] = { "StopProcess",
"ContProcess",
"EndProcess",
"KillProcess_Del"
"EndProcess_Del",
"KillProcess",
"ChangePriority",
"MemoryMaps",
Expand Down

0 comments on commit fba6272

Please sign in to comment.