mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:07:46 +00:00
Userland: Let applications make use of make_command_palette_action()
This commit is contained in:
parent
eb8c2bde90
commit
34acae90c7
45 changed files with 47 additions and 0 deletions
|
@ -239,6 +239,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(file_menu->try_add_separator());
|
||||
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));
|
||||
auto help_menu = TRY(window->try_add_menu("&Help"));
|
||||
TRY(help_menu->try_add_action(GUI::CommonActions::make_command_palette_action(window)));
|
||||
TRY(help_menu->try_add_action(GUI::CommonActions::make_about_action("Cube Demo", app_icon, window)));
|
||||
|
||||
cube->on_context_menu_request = [&](auto& event) {
|
||||
|
|
|
@ -91,6 +91,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));
|
||||
|
||||
auto help_menu = TRY(window->try_add_menu("&Help"));
|
||||
TRY(help_menu->try_add_action(GUI::CommonActions::make_command_palette_action(window)));
|
||||
TRY(help_menu->try_add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Eyes.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -473,6 +473,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(view_menu->try_add_action(zoom_out_action));
|
||||
|
||||
auto help_menu = TRY(window->try_add_menu("&Help"));
|
||||
TRY(help_menu->try_add_action(GUI::CommonActions::make_command_palette_action(window)));
|
||||
TRY(help_menu->try_add_action(GUI::CommonActions::make_about_action("Mandelbrot Demo", app_icon, window)));
|
||||
|
||||
window->show();
|
||||
|
|
|
@ -178,6 +178,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));
|
||||
|
||||
auto help_menu = TRY(window->try_add_menu("&Help"));
|
||||
TRY(help_menu->try_add_action(GUI::CommonActions::make_command_palette_action(window)));
|
||||
TRY(help_menu->try_add_action(GUI::CommonActions::make_about_action("Mouse Demo", app_icon, window)));
|
||||
|
||||
window->set_resizable(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue