From f54f5a9f42c6536fef436a950fcb76072300ed6a Mon Sep 17 00:00:00 2001 From: meizhigang Date: Fri, 13 Jan 2023 10:59:59 +0800 Subject: [PATCH] Fix plugin appearance load when caja does not exist Signed-off-by: meizhigang --- ...ix-plugin-appearance-load-when-caja-.patch | 37 +++++++++++++++++++ kiran-cc-daemon.spec | 6 ++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-fix-appearance-Fix-plugin-appearance-load-when-caja-.patch diff --git a/0001-fix-appearance-Fix-plugin-appearance-load-when-caja-.patch b/0001-fix-appearance-Fix-plugin-appearance-load-when-caja-.patch new file mode 100644 index 0000000..8991a1b --- /dev/null +++ b/0001-fix-appearance-Fix-plugin-appearance-load-when-caja-.patch @@ -0,0 +1,37 @@ +From 4ed9d96276ea0510177d16d449dfb0d9ffb0cc2d Mon Sep 17 00:00:00 2001 +From: meizhigang +Date: Fri, 13 Jan 2023 09:38:23 +0800 +Subject: [PATCH] fix(appearance):Fix plugin appearance load when caja does not + exist +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + -当caja不存在时适配appearance插件加载 + + #62952 +--- + plugins/appearance/font/appearance-font.cpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/plugins/appearance/font/appearance-font.cpp b/plugins/appearance/font/appearance-font.cpp +index 6e98a02..64bf8d8 100644 +--- a/plugins/appearance/font/appearance-font.cpp ++++ b/plugins/appearance/font/appearance-font.cpp +@@ -33,7 +33,12 @@ AppearanceFont::AppearanceFont() + this->xsettings_settings_ = Gio::Settings::create(XSETTINGS_SCHEMA_ID); + this->interface_settings_ = Gio::Settings::create(INTERFACE_SCHEMA_ID); + this->marco_settings_ = Gio::Settings::create(MARCO_SCHEMA_ID); +- this->caja_settings_ = Gio::Settings::create(CAJA_SCHEMA_ID); ++ ++ auto schemas = Gio::Settings::list_schemas(); ++ if (std::find(schemas.begin(), schemas.end(), CAJA_SCHEMA_ID) != schemas.end()) ++ { ++ this->caja_settings_ = Gio::Settings::create(CAJA_SCHEMA_ID); ++ } + } + + void AppearanceFont::init() +-- +2.27.0 + diff --git a/kiran-cc-daemon.spec b/kiran-cc-daemon.spec index d223d2e..0e8d8dc 100644 --- a/kiran-cc-daemon.spec +++ b/kiran-cc-daemon.spec @@ -1,6 +1,6 @@ Name: kiran-cc-daemon Version: 2.4.0 -Release: 6 +Release: 7 Summary: DBus daemon for Kiran Desktop License: MulanPSL-2.0 @@ -11,6 +11,7 @@ Patch0002: 0001-fix-passwd-Fix-password-policy-inconsistencies.patch Patch0003: 0001-feature-backlight-Support-brightness-modification-by.patch Patch0004: 0001-fix-accounts-Fix-the-polkit-action-for-ChangeAccount.patch Patch0005: 0001-fix-display-Fix-user-add-custom-mode-display.patch +Patch0006: 0001-fix-appearance-Fix-plugin-appearance-load-when-caja-.patch BuildRequires: cmake >= 3.2 @@ -156,6 +157,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || : %{_libdir}/pkgconfig/kiran-cc-daemon.pc %changelog +* Fri Jan 13 2023 meizhigang - 2.4.0-7 +- KYOS-B: Fix plugin appearance load when caja does not exist. + * Wed Jan 11 2023 meizhigang - 2.4.0-6 - KYOS-B: Fix user add custom mode display.