From 82c22a7484cace974a9a14fecd32393452866885 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 28 Feb 2019 13:02:55 +0100 Subject: ProcessManager: Add "continue" action that sends SIGCONT. --- Applications/ProcessManager/main.cpp | 16 ++++++++++++---- Base/res/icons/continue16.png | Bin 0 -> 252 bytes Base/res/icons/continue16.rgb | Bin 0 -> 1024 bytes Base/res/icons/stop16.png | Bin 275 -> 299 bytes Base/res/icons/stop16.rgb | Bin 1024 -> 1024 bytes 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 Base/res/icons/continue16.png create mode 100644 Base/res/icons/continue16.rgb diff --git a/Applications/ProcessManager/main.cpp b/Applications/ProcessManager/main.cpp index 46183ccad8..b5f6ce9258 100644 --- a/Applications/ProcessManager/main.cpp +++ b/Applications/ProcessManager/main.cpp @@ -37,8 +37,15 @@ int main(int argc, char** argv) kill(pid, SIGSTOP); }); + auto continue_action = GAction::create("Continue process", GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/continue16.rgb", { 16, 16 }), [process_table_view] (const GAction&) { + pid_t pid = process_table_view->selected_pid(); + if (pid != -1) + kill(pid, SIGCONT); + }); + toolbar->add_action(kill_action.copy_ref()); toolbar->add_action(stop_action.copy_ref()); + toolbar->add_action(continue_action.copy_ref()); auto menubar = make(); auto app_menu = make("ProcessManager"); @@ -48,10 +55,11 @@ int main(int argc, char** argv) })); menubar->add_menu(move(app_menu)); - auto file_menu = make("Process"); - file_menu->add_action(kill_action.copy_ref()); - file_menu->add_action(stop_action.copy_ref()); - menubar->add_menu(move(file_menu)); + auto process_menu = make("Process"); + process_menu->add_action(kill_action.copy_ref()); + process_menu->add_action(stop_action.copy_ref()); + process_menu->add_action(continue_action.copy_ref()); + menubar->add_menu(move(process_menu)); auto help_menu = make("Help"); help_menu->add_action(GAction::create("About", [] (const GAction&) { diff --git a/Base/res/icons/continue16.png b/Base/res/icons/continue16.png new file mode 100644 index 0000000000..ed6f96262c Binary files /dev/null and b/Base/res/icons/continue16.png differ diff --git a/Base/res/icons/continue16.rgb b/Base/res/icons/continue16.rgb new file mode 100644 index 0000000000..e96bfef450 Binary files /dev/null and b/Base/res/icons/continue16.rgb differ diff --git a/Base/res/icons/stop16.png b/Base/res/icons/stop16.png index c86551a7f7..294c407107 100644 Binary files a/Base/res/icons/stop16.png and b/Base/res/icons/stop16.png differ diff --git a/Base/res/icons/stop16.rgb b/Base/res/icons/stop16.rgb index 256159e86b..d60c677b73 100644 Binary files a/Base/res/icons/stop16.rgb and b/Base/res/icons/stop16.rgb differ -- cgit v1.2.3