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

Mail: Ask the user if they want to see the mail settings

This commit is contained in:
Undefine 2021-11-09 13:17:57 +01:00 committed by Brian Gianforcaro
parent bccfa205d3
commit 312bac1967
2 changed files with 11 additions and 1 deletions

View file

@ -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");