diff options
author | Undefine <cqundefine@gmail.com> | 2021-11-09 13:17:57 +0100 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-11 15:09:54 -0800 |
commit | 312bac19673f58cecf79a1383693cac35ede1162 (patch) | |
tree | f8567686d41172e498ca1fc0047ba46838b80716 /Userland/Applications/Mail/main.cpp | |
parent | bccfa205d3de4af42ba6b328509abeb5e9be7a45 (diff) | |
download | serenity-312bac19673f58cecf79a1383693cac35ede1162.zip |
Mail: Ask the user if they want to see the mail settings
Diffstat (limited to 'Userland/Applications/Mail/main.cpp')
-rw-r--r-- | Userland/Applications/Mail/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Applications/Mail/main.cpp b/Userland/Applications/Mail/main.cpp index 9611491040..9638bf3233 100644 --- a/Userland/Applications/Mail/main.cpp +++ b/Userland/Applications/Mail/main.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Luke Wilde <lukew@serenityos.org> + * Copyright (c) 2021, Undefine <cqundefine@gmail.com> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -7,6 +8,7 @@ #include "MailWidget.h" #include <LibConfig/Client.h> #include <LibCore/System.h> +#include <LibDesktop/Launcher.h> #include <LibGUI/Application.h> #include <LibGUI/Icon.h> #include <LibGUI/Menu.h> @@ -26,8 +28,13 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) TRY(Core::System::unveil("/etc", "r")); TRY(Core::System::unveil("/tmp/portal/webcontent", "rw")); TRY(Core::System::unveil("/tmp/portal/lookup", "rw")); + TRY(Core::System::unveil("/tmp/portal/launch", "rw")); TRY(Core::System::unveil(nullptr, nullptr)); + TRY(Desktop::Launcher::add_allowed_url(URL::create_with_file_protocol("/bin/MailSettings"))); + TRY(Desktop::Launcher::add_allowed_handler_with_any_url("/bin/MailSettings")); + TRY(Desktop::Launcher::seal_allowlist()); + auto window = GUI::Window::construct(); auto app_icon = GUI::Icon::default_icon("app-mail"); |