mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Userland: Let applications make use of make_command_palette_action()
This commit is contained in:
parent
eb8c2bde90
commit
34acae90c7
Notes:
sideshowbarker
2024-07-17 05:07:16 +09:00
Author: https://github.com/demostanis Commit: https://github.com/SerenityOS/serenity/commit/34acae90c7 Pull-request: https://github.com/SerenityOS/serenity/pull/15596 Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/linusg
45 changed files with 47 additions and 0 deletions
|
@ -576,6 +576,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
texture_mag_filter_nearest_action->set_checked(true);
|
||||
|
||||
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("3D File Viewer", app_icon, window));
|
||||
|
||||
window->show();
|
||||
|
|
|
@ -419,6 +419,7 @@ void BrowserWindow::build_menus()
|
|||
debug_menu.add_action(same_origin_policy_action);
|
||||
|
||||
auto& help_menu = add_menu("&Help");
|
||||
help_menu.add_action(GUI::CommonActions::make_command_palette_action(this));
|
||||
help_menu.add_action(WindowActions::the().about_action());
|
||||
}
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
round_menu.action_at(last_rounding_mode.value())->activate();
|
||||
|
||||
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("Calculator", app_icon, window));
|
||||
|
||||
window->show();
|
||||
|
|
|
@ -146,6 +146,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(view_menu->try_add_action(*view_year_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("Calendar", app_icon, window)));
|
||||
|
||||
window->show();
|
||||
|
|
|
@ -157,6 +157,7 @@ void CharacterMapWidget::initialize_menubar(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_help_action([&](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/CharacterMap.md"), "/bin/Help");
|
||||
}));
|
||||
|
|
|
@ -1047,6 +1047,7 @@ ErrorOr<int> run_in_windowed_mode(String const& initial_location, String const&
|
|||
TRY(go_menu->try_add_action(directory_view->open_terminal_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("File Manager"sv, GUI::Icon::default_icon("app-file-manager"sv), window)));
|
||||
|
||||
(void)TRY(main_toolbar.try_add_action(go_back_action));
|
||||
|
|
|
@ -669,6 +669,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
TRY(scale_menu->try_add_action(*m_scale_fifteen_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/FontEditor.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -244,6 +244,7 @@ ErrorOr<void> MainWidget::initialize_fallibles(GUI::Window& window)
|
|||
TRY(go_menu->try_add_action(*m_go_home_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::Action::create("&Contents", { Key_F1 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-unknown.png"sv)), [&](auto&) {
|
||||
String path = "/usr/share/man/man1/Help.md";
|
||||
open_page(path);
|
||||
|
|
|
@ -469,6 +469,7 @@ void HexEditorWidget::initialize_menubar(GUI::Window& window)
|
|||
little_endian_mode->set_checked(true);
|
||||
|
||||
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/HexEditor.md"), "/bin/Help");
|
||||
}));
|
||||
|
|
|
@ -329,6 +329,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(view_menu->try_add_action(hide_show_toolbar_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/ImageViewer.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -100,6 +100,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
settings_menu.add_action(auto_modifier_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_about_action("Keyboard Mapper", app_icon, window));
|
||||
|
||||
window->on_close_request = [&]() -> GUI::Window::CloseRequestDecision {
|
||||
|
|
|
@ -206,6 +206,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(accessibility_menu->try_add_action(achromatomaly_accessibility_action));
|
||||
|
||||
auto help_menu = TRY(window->try_add_menu("&Help"));
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Magnifier", app_icon, window));
|
||||
|
||||
window->show();
|
||||
|
|
|
@ -54,6 +54,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
}));
|
||||
|
||||
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("Mail", app_icon, window));
|
||||
|
||||
window->on_close_request = [&] {
|
||||
|
|
|
@ -67,6 +67,7 @@ void PDFViewerWidget::initialize_menubar(GUI::Window& window)
|
|||
view_menu.add_action(*m_reset_zoom_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_about_action("PDF Viewer", GUI::Icon::default_icon("app-pdf-viewer"sv), &window));
|
||||
}
|
||||
|
||||
|
|
|
@ -80,6 +80,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_about_action("Partition Editor", app_icon, window)));
|
||||
|
||||
window->show();
|
||||
|
|
|
@ -73,6 +73,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
main_widget->add_track_actions(edit_menu);
|
||||
|
||||
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("Piano", app_icon, window));
|
||||
|
||||
window->show();
|
||||
|
|
|
@ -877,6 +877,7 @@ void MainWidget::initialize_menubar(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("Pixel Paint", GUI::Icon::default_icon("app-pixel-paint"sv), &window));
|
||||
|
||||
m_levels_dialog_action = GUI::Action::create(
|
||||
|
|
|
@ -99,6 +99,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_about_action("Settings", app_icon, window)));
|
||||
|
||||
auto main_widget = TRY(window->try_set_main_widget<GUI::Widget>());
|
||||
|
|
|
@ -131,6 +131,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
visualization_actions.add_action(album_cover_visualization);
|
||||
|
||||
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("Sound Player", app_icon, window)));
|
||||
|
||||
window->show();
|
||||
|
|
|
@ -333,6 +333,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
}));
|
||||
|
||||
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(APP_NAME, app_icon, window));
|
||||
|
||||
// Configure the nodes context menu.
|
||||
|
|
|
@ -279,6 +279,8 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, NonnullRefPtrVe
|
|||
},
|
||||
window());
|
||||
|
||||
m_search_action = GUI::CommonActions::make_command_palette_action(&parent_window);
|
||||
|
||||
m_about_action = GUI::CommonActions::make_about_action("Spreadsheet", GUI::Icon::default_icon("app-spreadsheet"sv), &parent_window);
|
||||
|
||||
toolbar.add_action(*m_new_action);
|
||||
|
@ -664,6 +666,7 @@ void SpreadsheetWidget::initialize_menubar(GUI::Window& window)
|
|||
edit_menu.add_action(*m_insert_emoji_action);
|
||||
|
||||
auto& help_menu = window.add_menu("&Help");
|
||||
help_menu.add_action(*m_search_action);
|
||||
help_menu.add_action(*m_functions_help_action);
|
||||
help_menu.add_action(*m_about_action);
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ private:
|
|||
RefPtr<GUI::Action> m_change_background_color_action;
|
||||
RefPtr<GUI::Action> m_change_foreground_color_action;
|
||||
|
||||
RefPtr<GUI::Action> m_search_action;
|
||||
RefPtr<GUI::Action> m_functions_help_action;
|
||||
RefPtr<GUI::Action> m_about_action;
|
||||
|
||||
|
|
|
@ -447,6 +447,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
make_frequency_action(5);
|
||||
|
||||
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("System Monitor", app_icon, window));
|
||||
|
||||
process_table_view.on_activation = [&](auto&) {
|
||||
|
|
|
@ -411,6 +411,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(view_menu->try_add_action(terminal->clear_including_history_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/Terminal.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -617,6 +617,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
|||
syntax_menu.add_action(*m_sql_highlight);
|
||||
|
||||
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/TextEditor.md"), "/bin/Help");
|
||||
}));
|
||||
|
|
|
@ -304,6 +304,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
TRY(accessibility_menu->try_add_action(achromatomaly_accessibility_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("Theme Editor", GUI::Icon::default_icon("app-theme-editor"sv), &window)));
|
||||
|
||||
return {};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
}));
|
||||
|
|
|
@ -203,6 +203,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/man6/2048.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -176,6 +176,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/man6/Chess.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -61,6 +61,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/man6/FlappyBug.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -139,6 +139,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/man6/GameOfLife.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -100,6 +100,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(game_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/man6/Hearts.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -132,6 +132,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
theme_actions.add_action(wordle_theme_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/man6/MasterWord.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -123,6 +123,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
difficulty_actions.add_action(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/man6/Minesweeper.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -58,6 +58,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/man6/Snake.md"), "/bin/Help");
|
||||
})));
|
||||
|
|
|
@ -205,6 +205,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(game_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("Solitaire", app_icon, window)));
|
||||
|
||||
window->set_resizable(false);
|
||||
|
|
|
@ -273,6 +273,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(view_menu->try_add_action(best_time_actions));
|
||||
|
||||
auto help_menu = TRY(window->try_add_menu("&Help"));
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Spider", app_icon, window));
|
||||
|
||||
window->set_resizable(false);
|
||||
|
|
Loading…
Reference in a new issue