mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
ProcessManager: Add "continue" action that sends SIGCONT.
This commit is contained in:
parent
e427b514dc
commit
82c22a7484
Notes:
sideshowbarker
2024-07-19 15:35:51 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/82c22a7484c
5 changed files with 12 additions and 4 deletions
|
@ -37,8 +37,15 @@ int main(int argc, char** argv)
|
||||||
kill(pid, SIGSTOP);
|
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(kill_action.copy_ref());
|
||||||
toolbar->add_action(stop_action.copy_ref());
|
toolbar->add_action(stop_action.copy_ref());
|
||||||
|
toolbar->add_action(continue_action.copy_ref());
|
||||||
|
|
||||||
auto menubar = make<GMenuBar>();
|
auto menubar = make<GMenuBar>();
|
||||||
auto app_menu = make<GMenu>("ProcessManager");
|
auto app_menu = make<GMenu>("ProcessManager");
|
||||||
|
@ -48,10 +55,11 @@ int main(int argc, char** argv)
|
||||||
}));
|
}));
|
||||||
menubar->add_menu(move(app_menu));
|
menubar->add_menu(move(app_menu));
|
||||||
|
|
||||||
auto file_menu = make<GMenu>("Process");
|
auto process_menu = make<GMenu>("Process");
|
||||||
file_menu->add_action(kill_action.copy_ref());
|
process_menu->add_action(kill_action.copy_ref());
|
||||||
file_menu->add_action(stop_action.copy_ref());
|
process_menu->add_action(stop_action.copy_ref());
|
||||||
menubar->add_menu(move(file_menu));
|
process_menu->add_action(continue_action.copy_ref());
|
||||||
|
menubar->add_menu(move(process_menu));
|
||||||
|
|
||||||
auto help_menu = make<GMenu>("Help");
|
auto help_menu = make<GMenu>("Help");
|
||||||
help_menu->add_action(GAction::create("About", [] (const GAction&) {
|
help_menu->add_action(GAction::create("About", [] (const GAction&) {
|
||||||
|
|
BIN
Base/res/icons/continue16.png
Normal file
BIN
Base/res/icons/continue16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 252 B |
BIN
Base/res/icons/continue16.rgb
Normal file
BIN
Base/res/icons/continue16.rgb
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 299 B |
Binary file not shown.
Loading…
Reference in a new issue