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

LibGUI: Remove Menu::try_add_action()

And fall back to the infallible add_action().
This commit is contained in:
Andreas Kling 2023-08-14 10:14:27 +02:00
parent eec328e2ab
commit f2faf2767f
51 changed files with 758 additions and 769 deletions

View file

@ -38,7 +38,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
});
show_window_frame_action->set_checked(clock->show_window_frame());
auto menu = TRY(GUI::Menu::try_create());
TRY(menu->try_add_action(*show_window_frame_action));
menu->add_action(*show_window_frame_action);
clock->on_context_menu_request = [&](auto& event) {
menu->popup(event.screen_position());