diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-01-04 20:41:43 -0500 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2023-01-05 13:05:13 +0000 |
commit | 8c7f6abf58e792bcaca99680dec350d308eb9b97 (patch) | |
tree | 884a6bfe5a26407023eb87746fa80cc0e8064b7a /Userland/Games/Solitaire | |
parent | 33fd2c1af9dbecb627a091b34b33bd918fd1c6ab (diff) | |
download | serenity-8c7f6abf58e792bcaca99680dec350d308eb9b97.zip |
Games: Add a Cards Settings menu item to Hearts, Solitaire, and Spider
Diffstat (limited to 'Userland/Games/Solitaire')
-rw-r--r-- | Userland/Games/Solitaire/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Games/Solitaire/main.cpp b/Userland/Games/Solitaire/main.cpp index 8d7e3b1123..8f8617ab3f 100644 --- a/Userland/Games/Solitaire/main.cpp +++ b/Userland/Games/Solitaire/main.cpp @@ -27,7 +27,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio recvfd sendfd rpath unix")); + TRY(Core::System::pledge("stdio recvfd sendfd rpath unix proc exec")); auto app = TRY(GUI::Application::try_create(arguments)); auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-solitaire"sv)); @@ -40,9 +40,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) Config::pledge_domains({ "Games", "Solitaire" }); Config::monitor_domain("Games"); - TRY(Core::System::pledge("stdio recvfd sendfd rpath")); + TRY(Core::System::pledge("stdio recvfd sendfd rpath proc exec")); TRY(Core::System::unveil("/res", "r")); + TRY(Core::System::unveil("/bin/GamesSettings", "x")); TRY(Core::System::unveil(nullptr, nullptr)); auto window = TRY(GUI::Window::try_create()); @@ -204,6 +205,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) undo_action->set_enabled(false); TRY(game_menu->try_add_action(undo_action)); TRY(game_menu->try_add_separator()); + TRY(game_menu->try_add_action(TRY(Cards::make_cards_settings_action(window)))); TRY(game_menu->try_add_action(single_card_draw_action)); TRY(game_menu->try_add_action(three_card_draw_action)); TRY(game_menu->try_add_separator()); |