summaryrefslogtreecommitdiff
path: root/Applications/ProcessManager/main.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-28 13:02:55 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-28 13:02:55 +0100
commit82c22a7484cace974a9a14fecd32393452866885 (patch)
tree98af30ee62caa1f947514493248e1a2be209f53e /Applications/ProcessManager/main.cpp
parente427b514dcba0f4df1c2178d2f3f358e28964cc6 (diff)
downloadserenity-82c22a7484cace974a9a14fecd32393452866885.zip
ProcessManager: Add "continue" action that sends SIGCONT.
Diffstat (limited to 'Applications/ProcessManager/main.cpp')
-rw-r--r--Applications/ProcessManager/main.cpp16
1 files changed, 12 insertions, 4 deletions
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<GMenuBar>();
auto app_menu = make<GMenu>("ProcessManager");
@@ -48,10 +55,11 @@ int main(int argc, char** argv)
}));
menubar->add_menu(move(app_menu));
- auto file_menu = make<GMenu>("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<GMenu>("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<GMenu>("Help");
help_menu->add_action(GAction::create("About", [] (const GAction&) {