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

LibGUI+Applications: Use String in make_about_action()

This commit is contained in:
Tim Ledbetter 2023-09-13 20:34:46 +01:00 committed by Andreas Kling
parent e7a5a2e146
commit ccab5ddf9b
53 changed files with 60 additions and 60 deletions

View file

@ -221,7 +221,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/2048.md"), "/bin/Help");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("2048", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("2048"_string, app_icon, window));
window->show();

View file

@ -26,7 +26,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app = TRY(GUI::Application::create(arguments));
auto const app_name = "BrickGame"sv;
auto const title = "Brick Game"sv;
auto const title = "Brick Game"_string;
auto const man_file = "/usr/share/man/man6/BrickGame.md"sv;
Config::pledge_domain(app_name);
@ -45,7 +45,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto window = TRY(GUI::Window::try_create());
window->set_double_buffering_enabled(false);
window->set_title(title);
window->set_title(title.bytes_as_string_view());
window->resize(360, 462);
window->set_resizable(false);

View file

@ -198,7 +198,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/Chess.md"), "/bin/Help");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("Chess", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("Chess"_string, app_icon, window));
window->show();
widget->reset();

View file

@ -25,7 +25,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app = TRY(GUI::Application::create(arguments));
auto const app_name = "ColorLines"sv;
auto const title = "Color Lines"sv;
auto const title = "Color Lines"_string;
auto const man_file = "/usr/share/man/man6/ColorLines.md"sv;
Config::pledge_domain(app_name);
@ -44,7 +44,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto window = TRY(GUI::Window::try_create());
window->set_double_buffering_enabled(false);
window->set_title(title);
window->set_title(title.bytes_as_string_view());
window->resize(436, 481);
window->set_resizable(false);

View file

@ -65,7 +65,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
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");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("Flappy Bug", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("Flappy Bug"_string, app_icon, window));
window->show();

View file

@ -192,7 +192,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/Flood.md"), "/bin/Help");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("Flood", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("Flood"_string, app_icon, window));
window->show();

View file

@ -150,7 +150,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/GameOfLife.md"), "/bin/Help");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("Game of Life", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("Game of Life"_string, app_icon, window));
board_widget->on_running_state_change = [&]() {
if (board_widget->is_running()) {

View file

@ -103,7 +103,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/Hearts.md"), "/bin/Help");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("Hearts", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("Hearts"_string, app_icon, window));
window->set_resizable(false);
window->resize(Hearts::Game::width, Hearts::Game::height + statusbar.max_height().as_int());

View file

@ -132,7 +132,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/MasterWord.md"), "/bin/Help");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("MasterWord", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("MasterWord"_string, app_icon, window));
game.on_message = [&](auto message) {
if (!message.has_value())

View file

@ -123,7 +123,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/Minesweeper.md"), "/bin/Help");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("Minesweeper", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("Minesweeper"_string, app_icon, window));
window->show();

View file

@ -156,7 +156,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man6/Snake.md"), "/bin/Help");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("Snake", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("Snake"_string, app_icon, window));
window->show();

View file

@ -222,7 +222,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
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_about_action("Solitaire", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("Solitaire"_string, app_icon, window));
help_menu->add_action(GUI::CommonActions::make_help_action([&man_file](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme(man_file), "/bin/Help");

View file

@ -279,7 +279,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
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_about_action("Spider", app_icon, window));
help_menu->add_action(GUI::CommonActions::make_about_action("Spider"_string, app_icon, window));
window->set_resizable(false);
window->resize(Spider::Game::width, Spider::Game::height + statusbar.max_height().as_int());