Fix plugin appearance load when caja does not exist

Signed-off-by: meizhigang <meizhigang@kylinsec.com.cn>
This commit is contained in:
meizhigang 2023-01-13 10:59:59 +08:00
parent 6dfd10077d
commit f54f5a9f42
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From 4ed9d96276ea0510177d16d449dfb0d9ffb0cc2d Mon Sep 17 00:00:00 2001
From: meizhigang <meizhigang@kylinsec.com.cn>
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

View File

@ -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 <meizhigang@kylinsec.com.cn> - 2.4.0-7
- KYOS-B: Fix plugin appearance load when caja does not exist.
* Wed Jan 11 2023 meizhigang <meizhigang@kylinsec.com.cn> - 2.4.0-6
- KYOS-B: Fix user add custom mode display.