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

LibGUI+Userland: Make Window::*add_menu take name using new string

This commit is contained in:
Karol Kosek 2023-04-16 11:56:01 +02:00 committed by Andreas Kling
parent 60a338758c
commit 969543a847
52 changed files with 162 additions and 162 deletions

View file

@ -77,7 +77,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return true;
};
auto game_menu = TRY(window->try_add_menu("&Game"));
auto game_menu = TRY(window->try_add_menu("&Game"_short_string));
TRY(game_menu->try_add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/reload.png"sv)), [&](auto&) {
game.reset();
@ -144,7 +144,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
GUI::Application::the()->quit();
})));
auto help_menu = TRY(window->try_add_menu("&Help"));
auto help_menu = TRY(window->try_add_menu("&Help"_short_string));
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");