2021-07-30 04:03:55 +03:00
|
|
|
/*
|
2021-10-04 12:54:23 +03:00
|
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
2021-11-20 17:45:57 +03:00
|
|
|
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
2021-07-30 04:03:55 +03:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
2021-11-20 17:45:57 +03:00
|
|
|
#include "MailSettingsWidget.h"
|
2021-08-28 17:04:51 +03:00
|
|
|
#include <LibConfig/Client.h>
|
2021-07-30 04:03:55 +03:00
|
|
|
#include <LibGUI/Application.h>
|
|
|
|
#include <LibGUI/Icon.h>
|
2021-11-20 17:45:57 +03:00
|
|
|
#include <LibGUI/SettingsWindow.h>
|
2021-07-30 04:03:55 +03:00
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
2021-08-28 17:04:51 +03:00
|
|
|
if (pledge("stdio rpath recvfd sendfd unix", nullptr) < 0) {
|
2021-07-30 04:03:55 +03:00
|
|
|
perror("pledge");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto app = GUI::Application::construct(argc, argv);
|
|
|
|
|
2021-08-28 17:04:51 +03:00
|
|
|
Config::pledge_domains("Mail");
|
|
|
|
|
|
|
|
if (pledge("stdio rpath recvfd sendfd", nullptr) < 0) {
|
2021-07-30 04:03:55 +03:00
|
|
|
perror("pledge");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2021-08-28 17:05:10 +03:00
|
|
|
if (unveil("/res", "r") < 0) {
|
|
|
|
perror("unveil");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (unveil(nullptr, nullptr)) {
|
|
|
|
perror("unveil");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2021-08-28 13:22:50 +03:00
|
|
|
auto app_icon = GUI::Icon::default_icon("app-mail");
|
2021-07-30 04:03:55 +03:00
|
|
|
|
2021-11-20 17:45:57 +03:00
|
|
|
auto window = GUI::SettingsWindow::construct("Mail Settings", GUI::SettingsWindow::ShowDefaultsButton::Yes);
|
|
|
|
window->add_tab<MailSettingsWidget>("Mail");
|
2021-07-30 04:03:55 +03:00
|
|
|
window->set_icon(app_icon.bitmap_for_size(16));
|
|
|
|
|
|
|
|
window->show();
|
|
|
|
return app->exec();
|
|
|
|
}
|