mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:27:35 +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
|
@ -260,6 +260,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
};
|
||||
|
||||
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/GMLPlayground.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -1524,6 +1524,7 @@ void HackStudioWidget::create_view_menu(GUI::Window& window)
|
|||
void HackStudioWidget::create_help_menu(GUI::Window& window)
|
||||
{
|
||||
auto& help_menu = window.add_menu("&Help");
|
||||
help_menu.add_action(GUI::CommonActions::make_command_palette_action(&window));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Hack Studio", GUI::Icon::default_icon("app-hack-studio"sv), &window));
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
|
||||
auto& help_menu = window->add_menu("&Help");
|
||||
help_menu.add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Inspector.md"), "/bin/Help");
|
||||
}));
|
||||
|
|
|
@ -300,6 +300,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(view_menu->try_add_action(source_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_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Profiler.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -264,6 +264,7 @@ void MainWidget::initialize_menu(GUI::Window* window)
|
|||
edit_menu.add_action(*m_run_script_action);
|
||||
|
||||
auto& help_menu = window->add_menu("&Help");
|
||||
help_menu.add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/SQLStudio.md"), "/bin/Help");
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue