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:
parent
5300896095
commit
bd61e75e0b
51 changed files with 294 additions and 302 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue