mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:38:10 +00:00
DisplaySettings: Port to LibMain :^)
This commit is contained in:
parent
343de29652
commit
984cf1fe7a
2 changed files with 7 additions and 10 deletions
|
@ -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)
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue