diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/DisplaySettings/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Userland/Applications/DisplaySettings/main.cpp | 15 |
2 files changed, 7 insertions, 10 deletions
diff --git a/Userland/Applications/DisplaySettings/CMakeLists.txt b/Userland/Applications/DisplaySettings/CMakeLists.txt index 457e70d4be..c1ab36a1c2 100644 --- a/Userland/Applications/DisplaySettings/CMakeLists.txt +++ b/Userland/Applications/DisplaySettings/CMakeLists.txt @@ -23,4 +23,4 @@ set(SOURCES ) serenity_app(DisplaySettings ICON app-display-settings) -target_link_libraries(DisplaySettings LibDesktop LibGUI LibConfig) +target_link_libraries(DisplaySettings LibDesktop LibGUI LibConfig LibMain) 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"); |