summaryrefslogtreecommitdiff
path: root/Userland/Applications/DisplaySettings/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications/DisplaySettings/main.cpp')
-rw-r--r--Userland/Applications/DisplaySettings/main.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/Userland/Applications/DisplaySettings/main.cpp b/Userland/Applications/DisplaySettings/main.cpp
index d42a07cdbf..fbfd8490b2 100644
--- a/Userland/Applications/DisplaySettings/main.cpp
+++ b/Userland/Applications/DisplaySettings/main.cpp
@@ -11,25 +11,22 @@
#include "FontSettingsWidget.h"
#include "MonitorSettingsWidget.h"
#include <LibConfig/Client.h>
+#include <LibCore/System.h>
#include <LibGUI/Application.h>
#include <LibGUI/Icon.h>
#include <LibGUI/SettingsWindow.h>
-#include <stdio.h>
-#include <unistd.h>
+#include <LibMain/Main.h>
-int main(int argc, char** argv)
+ErrorOr<int> serenity_main(Main::Arguments arguments)
{
- if (pledge("stdio thread recvfd sendfd rpath cpath wpath unix", nullptr) < 0) {
- perror("pledge");
- return 1;
- }
+ TRY(Core::System::pledge("stdio thread recvfd sendfd rpath cpath wpath unix"));
- auto app = GUI::Application::construct(argc, argv);
+ auto app = TRY(GUI::Application::try_create(arguments));
Config::pledge_domains("WindowManager");
auto app_icon = GUI::Icon::default_icon("app-display-settings");
- auto window = GUI::SettingsWindow::construct("Display Settings");
+ auto window = TRY(GUI::SettingsWindow::try_create("Display Settings"));
window->add_tab<DisplaySettings::BackgroundSettingsWidget>("Background");
window->add_tab<DisplaySettings::FontSettingsWidget>("Fonts");
window->add_tab<DisplaySettings::MonitorSettingsWidget>("Monitor");