1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibGUI: Remove Window::try_add_menu()

And fall back to the infallible add_menu().
This commit is contained in:
Andreas Kling 2023-08-14 10:44:42 +02:00
parent 5300896095
commit bd61e75e0b
51 changed files with 294 additions and 302 deletions

View file

@ -55,12 +55,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return high_score;
};
auto game_menu = TRY(window->try_add_menu("&Game"_string));
auto game_menu = window->add_menu("&Game"_string);
game_menu->add_action(GUI::CommonActions::make_quit_action([](auto&) {
GUI::Application::the()->quit();
}));
auto help_menu = TRY(window->try_add_menu("&Help"_string));
auto help_menu = window->add_menu("&Help"_string);
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/man6/FlappyBug.md"), "/bin/Help");