mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
ProcessManager: Add a "stop" action that sends SIGSTOP to a process.
This commit is contained in:
parent
c09ab7cc40
commit
c5a32d139a
Notes:
sideshowbarker
2024-07-19 15:35:56 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c5a32d139a4
3 changed files with 9 additions and 0 deletions
|
@ -30,7 +30,15 @@ int main(int argc, char** argv)
|
|||
if (pid != -1)
|
||||
kill(pid, SIGKILL);
|
||||
});
|
||||
|
||||
auto stop_action = GAction::create("Stop process", GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/stop16.rgb", { 16, 16 }), [process_table_view] (const GAction&) {
|
||||
pid_t pid = process_table_view->selected_pid();
|
||||
if (pid != -1)
|
||||
kill(pid, SIGSTOP);
|
||||
});
|
||||
|
||||
toolbar->add_action(kill_action.copy_ref());
|
||||
toolbar->add_action(stop_action.copy_ref());
|
||||
|
||||
auto menubar = make<GMenuBar>();
|
||||
auto app_menu = make<GMenu>("ProcessManager");
|
||||
|
@ -42,6 +50,7 @@ int main(int argc, char** argv)
|
|||
|
||||
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 help_menu = make<GMenu>("Help");
|
||||
|
|
BIN
Base/res/icons/stop16.png
Normal file
BIN
Base/res/icons/stop16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 275 B |
BIN
Base/res/icons/stop16.rgb
Normal file
BIN
Base/res/icons/stop16.rgb
Normal file
Binary file not shown.
Loading…
Reference in a new issue