From d276657f85f44711e9e3814ca002c0995eaf869f Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Sun, 29 Aug 2021 10:03:46 -0400 Subject: LibGUI/Desktop: Use LibConfig instead of Core::ConfigFile --- Userland/Libraries/LibGUI/CMakeLists.txt | 2 +- Userland/Libraries/LibGUI/Desktop.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Userland/Libraries/LibGUI/CMakeLists.txt b/Userland/Libraries/LibGUI/CMakeLists.txt index 7dd86a9e7c..a3e3ec78e0 100644 --- a/Userland/Libraries/LibGUI/CMakeLists.txt +++ b/Userland/Libraries/LibGUI/CMakeLists.txt @@ -124,4 +124,4 @@ set(GENERATED_SOURCES ) serenity_lib(LibGUI gui) -target_link_libraries(LibGUI LibCore LibGfx LibIPC LibThreading LibRegex LibSyntax) +target_link_libraries(LibGUI LibCore LibGfx LibIPC LibThreading LibRegex LibSyntax LibConfig) diff --git a/Userland/Libraries/LibGUI/Desktop.cpp b/Userland/Libraries/LibGUI/Desktop.cpp index 465c3976cd..ce9bf989b9 100644 --- a/Userland/Libraries/LibGUI/Desktop.cpp +++ b/Userland/Libraries/LibGUI/Desktop.cpp @@ -5,11 +5,13 @@ */ #include -#include #include #include #include +// Including this after to avoid LibIPC errors +#include + namespace GUI { Desktop& Desktop::the() @@ -59,10 +61,8 @@ bool Desktop::set_wallpaper(const StringView& path, bool save_config) auto ret_val = WindowServerConnection::the().wait_for_specific_message()->success(); if (ret_val && save_config) { - RefPtr config = Core::ConfigFile::open_for_app("WindowManager", Core::ConfigFile::AllowWriting::Yes); - dbgln("Saving wallpaper path '{}' to config file at {}", path, config->filename()); - config->write_entry("Background", "Wallpaper", path); - config->sync(); + dbgln("Saving wallpaper path '{}' to ConfigServer", path); + Config::write_string("WindowManager", "Background", "Wallpaper", path); } return ret_val; -- cgit v1.2.3