mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:07:45 +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
|
@ -159,12 +159,12 @@ CharacterMapWidget::CharacterMapWidget()
|
|||
|
||||
ErrorOr<void> CharacterMapWidget::initialize_menubar(GUI::Window& window)
|
||||
{
|
||||
auto file_menu = TRY(window.try_add_menu("&File"_string));
|
||||
auto file_menu = window.add_menu("&File"_string);
|
||||
file_menu->add_action(GUI::CommonActions::make_quit_action([](GUI::Action&) {
|
||||
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/man1/Applications/CharacterMap.md"), "/bin/Help");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue