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

LibGUI+Userland: Port Action status tips to String

This commit is contained in:
Karol Kosek 2023-06-04 11:22:04 +02:00 committed by Sam Atkins
parent 4b169cf25f
commit 5234a30731
16 changed files with 86 additions and 85 deletions

View file

@ -144,7 +144,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
GUI::Process::spawn_or_show_error(window, "/bin/GamesSettings"sv, Array { "--open-tab", "chess" });
},
window);
settings_action->set_status_tip("Open the Game Settings for Chess");
settings_action->set_status_tip(TRY("Open the Game Settings for Chess"_string));
TRY(game_menu->try_add_action(settings_action));
auto show_available_moves_action = GUI::Action::create_checkable("Show Available Moves", [&](auto& action) {

View file

@ -176,7 +176,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
game.setup(mode);
});
single_card_draw_action->set_checked(mode == Solitaire::Mode::SingleCardDraw);
single_card_draw_action->set_status_tip("Draw one card at a time");
single_card_draw_action->set_status_tip(TRY("Draw one card at a time"_string));
draw_setting_actions.add_action(single_card_draw_action);
auto three_card_draw_action = GUI::Action::create_checkable("&Three Card Draw", [&](auto&) {
@ -189,7 +189,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
game.setup(mode);
});
three_card_draw_action->set_checked(mode == Solitaire::Mode::ThreeCardDraw);
three_card_draw_action->set_status_tip("Draw three cards at a time");
three_card_draw_action->set_status_tip(TRY("Draw three cards at a time"_string));
draw_setting_actions.add_action(three_card_draw_action);
game.set_auto_collect(Config::read_bool("Solitaire"sv, "Settings"sv, "AutoCollect"sv, false));
@ -199,7 +199,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Config::write_bool("Solitaire"sv, "Settings"sv, "AutoCollect"sv, checked);
});
toggle_auto_collect_action->set_checked(game.is_auto_collecting());
toggle_auto_collect_action->set_status_tip("Auto-collect to foundation piles");
toggle_auto_collect_action->set_status_tip(TRY("Auto-collect to foundation piles"_string));
auto game_menu = TRY(window->try_add_menu("&Game"_short_string));