!108 移除激活/不激活mate插件代码,添加mate插件gschema的重写文件
From: @yuan__xing Reviewed-by: @liubuguiii Signed-off-by: @liubuguiii
This commit is contained in:
commit
6c32f9e675
432
0001-fix-plugin-remove-active-or-deactive-mate-plugin-cod.patch
Normal file
432
0001-fix-plugin-remove-active-or-deactive-mate-plugin-cod.patch
Normal file
@ -0,0 +1,432 @@
|
|||||||
|
From b8295ad613323c7a2d637caa06b918019e9dbaf2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: yuanxing <yuanxing@kylinsec.com.cn>
|
||||||
|
Date: Thu, 14 Sep 2023 18:51:56 +0800
|
||||||
|
Subject: [PATCH] fix(plugin):remove active or deactive mate plugin code
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
- 移除 激活/不激活 mate插件代码
|
||||||
|
---
|
||||||
|
plugins/appearance/appearance-plugin.cpp | 26 +------------------
|
||||||
|
plugins/clipboard/clipboard-plugin.cpp | 26 +------------------
|
||||||
|
plugins/display/display-plugin.cpp | 26 +------------------
|
||||||
|
.../inputdevices/keyboard/keyboard-plugin.cpp | 26 +------------------
|
||||||
|
plugins/inputdevices/mouse/mouse-plugin.cpp | 25 +-----------------
|
||||||
|
.../inputdevices/touchpad/touchpad-plugin.cpp | 26 +------------------
|
||||||
|
plugins/keybinding/keybinding-plugin.cpp | 26 +------------------
|
||||||
|
plugins/xsettings/xsettings-plugin.cpp | 26 +------------------
|
||||||
|
8 files changed, 8 insertions(+), 199 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/appearance/appearance-plugin.cpp b/plugins/appearance/appearance-plugin.cpp
|
||||||
|
index 8f3e123..f5dcdaa 100644
|
||||||
|
--- a/plugins/appearance/appearance-plugin.cpp
|
||||||
|
+++ b/plugins/appearance/appearance-plugin.cpp
|
||||||
|
@@ -19,9 +19,6 @@
|
||||||
|
|
||||||
|
PLUGIN_EXPORT_FUNC_DEF(AppearancePlugin);
|
||||||
|
|
||||||
|
-#define MATE_BACKGROUND_SCHEMA_ID "org.mate.SettingsDaemon.plugins.background"
|
||||||
|
-#define MATE_BACKGROUND_SCHEMA_KEY_ACTIVE "active"
|
||||||
|
-
|
||||||
|
namespace Kiran
|
||||||
|
{
|
||||||
|
AppearancePlugin::AppearancePlugin()
|
||||||
|
@@ -36,17 +33,6 @@ void AppearancePlugin::activate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("active appearance plugin.");
|
||||||
|
|
||||||
|
- // kiran和mate的插件最好不要同时运行,如果开启了kiran的插件,则将mate的插件停用
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_BACKGROUND_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_background = Gio::Settings::create(MATE_BACKGROUND_SCHEMA_ID);
|
||||||
|
- if (mate_background->get_boolean(MATE_BACKGROUND_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_background->set_boolean(MATE_BACKGROUND_SCHEMA_KEY_ACTIVE, false);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
AppearanceManager::global_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -54,16 +40,6 @@ void AppearancePlugin::deactivate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("deactive appearance plugin.");
|
||||||
|
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_BACKGROUND_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_background = Gio::Settings::create(MATE_BACKGROUND_SCHEMA_ID);
|
||||||
|
- if (!mate_background->get_boolean(MATE_BACKGROUND_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_background->set_boolean(MATE_BACKGROUND_SCHEMA_KEY_ACTIVE, true);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
AppearanceManager::global_deinit();
|
||||||
|
}
|
||||||
|
-} // namespace Kiran
|
||||||
|
\ No newline at end of file
|
||||||
|
+} // namespace Kiran
|
||||||
|
diff --git a/plugins/clipboard/clipboard-plugin.cpp b/plugins/clipboard/clipboard-plugin.cpp
|
||||||
|
index 7a9cbec..92b6a20 100644
|
||||||
|
--- a/plugins/clipboard/clipboard-plugin.cpp
|
||||||
|
+++ b/plugins/clipboard/clipboard-plugin.cpp
|
||||||
|
@@ -18,9 +18,6 @@
|
||||||
|
|
||||||
|
PLUGIN_EXPORT_FUNC_DEF(ClipboardPlugin);
|
||||||
|
|
||||||
|
-#define MATE_CLIPBOARD_SCHEMA_ID "org.mate.SettingsDaemon.plugins.clipboard"
|
||||||
|
-#define MATE_CLIPBOARD_SCHEMA_KEY_ACTIVE "active"
|
||||||
|
-
|
||||||
|
namespace Kiran
|
||||||
|
{
|
||||||
|
ClipboardPlugin::ClipboardPlugin()
|
||||||
|
@@ -35,17 +32,6 @@ void ClipboardPlugin::activate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("active clipboard plugin.");
|
||||||
|
|
||||||
|
- // kiran和mate的插件最好不要同时运行,如果开启了kiran的插件,则将mate的插件停用
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_CLIPBOARD_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_clipboard = Gio::Settings::create(MATE_CLIPBOARD_SCHEMA_ID);
|
||||||
|
- if (mate_clipboard->get_boolean(MATE_CLIPBOARD_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_clipboard->set_boolean(MATE_CLIPBOARD_SCHEMA_KEY_ACTIVE, false);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
ClipboardManager::global_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -53,16 +39,6 @@ void ClipboardPlugin::deactivate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("deactive clipboard plugin.");
|
||||||
|
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_CLIPBOARD_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_clipboard = Gio::Settings::create(MATE_CLIPBOARD_SCHEMA_ID);
|
||||||
|
- if (!mate_clipboard->get_boolean(MATE_CLIPBOARD_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_clipboard->set_boolean(MATE_CLIPBOARD_SCHEMA_KEY_ACTIVE, true);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
ClipboardManager::global_deinit();
|
||||||
|
}
|
||||||
|
-} // namespace Kiran
|
||||||
|
\ No newline at end of file
|
||||||
|
+} // namespace Kiran
|
||||||
|
diff --git a/plugins/display/display-plugin.cpp b/plugins/display/display-plugin.cpp
|
||||||
|
index 0385f33..32ae5be 100644
|
||||||
|
--- a/plugins/display/display-plugin.cpp
|
||||||
|
+++ b/plugins/display/display-plugin.cpp
|
||||||
|
@@ -22,9 +22,6 @@
|
||||||
|
|
||||||
|
PLUGIN_EXPORT_FUNC_DEF(DisplayPlugin);
|
||||||
|
|
||||||
|
-#define MATE_XRANDR_SCHEMA_ID "org.mate.SettingsDaemon.plugins.xrandr"
|
||||||
|
-#define MATE_XRANDR_SCHEMA_KEY_ACTIVE "active"
|
||||||
|
-
|
||||||
|
namespace Kiran
|
||||||
|
{
|
||||||
|
DisplayPlugin::DisplayPlugin()
|
||||||
|
@@ -38,16 +35,6 @@ DisplayPlugin::~DisplayPlugin()
|
||||||
|
void DisplayPlugin::activate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("active display plugin.");
|
||||||
|
- // kiran和mate的插件最好不要同时运行,如果开启了kiran的插件,则将mate的插件停用
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_XRANDR_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_display = Gio::Settings::create(MATE_XRANDR_SCHEMA_ID);
|
||||||
|
- if (mate_display->get_boolean(MATE_XRANDR_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_display->set_boolean(MATE_XRANDR_SCHEMA_KEY_ACTIVE, false);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
|
||||||
|
XrandrManager::global_init();
|
||||||
|
DisplayManager::global_init(XrandrManager::get_instance());
|
||||||
|
@@ -57,18 +44,7 @@ void DisplayPlugin::deactivate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("deactive display plugin.");
|
||||||
|
|
||||||
|
- // 恢复MATE的插件
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_XRANDR_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_display = Gio::Settings::create(MATE_XRANDR_SCHEMA_ID);
|
||||||
|
- if (!mate_display->get_boolean(MATE_XRANDR_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_display->set_boolean(MATE_XRANDR_SCHEMA_KEY_ACTIVE, true);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
DisplayManager::global_deinit();
|
||||||
|
XrandrManager::global_deinit();
|
||||||
|
}
|
||||||
|
-} // namespace Kiran
|
||||||
|
\ No newline at end of file
|
||||||
|
+} // namespace Kiran
|
||||||
|
diff --git a/plugins/inputdevices/keyboard/keyboard-plugin.cpp b/plugins/inputdevices/keyboard/keyboard-plugin.cpp
|
||||||
|
index a8d26bb..6c7b727 100644
|
||||||
|
--- a/plugins/inputdevices/keyboard/keyboard-plugin.cpp
|
||||||
|
+++ b/plugins/inputdevices/keyboard/keyboard-plugin.cpp
|
||||||
|
@@ -23,9 +23,6 @@
|
||||||
|
|
||||||
|
PLUGIN_EXPORT_FUNC_DEF(KeyboardPlugin);
|
||||||
|
|
||||||
|
-#define MATE_KEYBOARD_SCHEMA_ID "org.mate.SettingsDaemon.plugins.keyboard"
|
||||||
|
-#define MATE_KEYBOARD_SCHEMA_KEY_ACTIVE "active"
|
||||||
|
-
|
||||||
|
namespace Kiran
|
||||||
|
{
|
||||||
|
KeyboardPlugin::KeyboardPlugin()
|
||||||
|
@@ -40,17 +37,6 @@ void KeyboardPlugin::activate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("active keyboard plugin.");
|
||||||
|
|
||||||
|
- // kiran和mate的插件最好不要同时运行,如果开启了kiran的插件,则将mate的插件停用
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_KEYBOARD_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_keyboard = Gio::Settings::create(MATE_KEYBOARD_SCHEMA_ID);
|
||||||
|
- if (mate_keyboard->get_boolean(MATE_KEYBOARD_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_keyboard->set_boolean(MATE_KEYBOARD_SCHEMA_KEY_ACTIVE, false);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
KeyboardManager::global_init();
|
||||||
|
ModifierLockManager::global_init(KeyboardManager::get_instance());
|
||||||
|
}
|
||||||
|
@@ -59,17 +45,7 @@ void KeyboardPlugin::deactivate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("deactive keyboard plugin.");
|
||||||
|
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_KEYBOARD_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_keyboard = Gio::Settings::create(MATE_KEYBOARD_SCHEMA_ID);
|
||||||
|
- if (!mate_keyboard->get_boolean(MATE_KEYBOARD_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_keyboard->set_boolean(MATE_KEYBOARD_SCHEMA_KEY_ACTIVE, true);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
ModifierLockManager::global_deinit();
|
||||||
|
KeyboardManager::global_deinit();
|
||||||
|
}
|
||||||
|
-} // namespace Kiran
|
||||||
|
\ No newline at end of file
|
||||||
|
+} // namespace Kiran
|
||||||
|
diff --git a/plugins/inputdevices/mouse/mouse-plugin.cpp b/plugins/inputdevices/mouse/mouse-plugin.cpp
|
||||||
|
index 8109a03..bb1d47d 100644
|
||||||
|
--- a/plugins/inputdevices/mouse/mouse-plugin.cpp
|
||||||
|
+++ b/plugins/inputdevices/mouse/mouse-plugin.cpp
|
||||||
|
@@ -21,9 +21,6 @@
|
||||||
|
|
||||||
|
PLUGIN_EXPORT_FUNC_DEF(MousePlugin);
|
||||||
|
|
||||||
|
-#define MATE_MOUSE_SCHEMA_ID "org.mate.SettingsDaemon.plugins.mouse"
|
||||||
|
-#define MATE_MOUSE_SCHEMA_KEY_ACTIVE "active"
|
||||||
|
-
|
||||||
|
namespace Kiran
|
||||||
|
{
|
||||||
|
MousePlugin::MousePlugin()
|
||||||
|
@@ -38,16 +35,6 @@ void MousePlugin::activate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("active mouse plugin.");
|
||||||
|
|
||||||
|
- // kiran和mate的相同插件不要同时运行,如果开启了kiran的插件,则将mate的插件停用
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_MOUSE_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_mouse = Gio::Settings::create(MATE_MOUSE_SCHEMA_ID);
|
||||||
|
- if (mate_mouse->get_boolean(MATE_MOUSE_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_mouse->set_boolean(MATE_MOUSE_SCHEMA_KEY_ACTIVE, false);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
MouseManager::global_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -55,16 +42,6 @@ void MousePlugin::deactivate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("deactive mouse plugin.");
|
||||||
|
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_MOUSE_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_mouse = Gio::Settings::create(MATE_MOUSE_SCHEMA_ID);
|
||||||
|
- if (!mate_mouse->get_boolean(MATE_MOUSE_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_mouse->set_boolean(MATE_MOUSE_SCHEMA_KEY_ACTIVE, true);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
MouseManager::global_deinit();
|
||||||
|
}
|
||||||
|
-} // namespace Kiran
|
||||||
|
\ No newline at end of file
|
||||||
|
+} // namespace Kiran
|
||||||
|
diff --git a/plugins/inputdevices/touchpad/touchpad-plugin.cpp b/plugins/inputdevices/touchpad/touchpad-plugin.cpp
|
||||||
|
index 00ac7a9..910038c 100644
|
||||||
|
--- a/plugins/inputdevices/touchpad/touchpad-plugin.cpp
|
||||||
|
+++ b/plugins/inputdevices/touchpad/touchpad-plugin.cpp
|
||||||
|
@@ -21,9 +21,6 @@
|
||||||
|
|
||||||
|
PLUGIN_EXPORT_FUNC_DEF(TouchPadPlugin);
|
||||||
|
|
||||||
|
-#define MATE_MOUSE_SCHEMA_ID "org.mate.SettingsDaemon.plugins.mouse"
|
||||||
|
-#define MATE_MOUSE_SCHEMA_KEY_ACTIVE "active"
|
||||||
|
-
|
||||||
|
namespace Kiran
|
||||||
|
{
|
||||||
|
TouchPadPlugin::TouchPadPlugin()
|
||||||
|
@@ -38,17 +35,6 @@ void TouchPadPlugin::activate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("active touchpad plugin.");
|
||||||
|
|
||||||
|
- // kiran和mate的相同插件不要同时运行,如果开启了kiran的插件,则将mate的插件停用
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_MOUSE_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_touchpad = Gio::Settings::create(MATE_MOUSE_SCHEMA_ID);
|
||||||
|
- if (mate_touchpad->get_boolean(MATE_MOUSE_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_touchpad->set_boolean(MATE_MOUSE_SCHEMA_KEY_ACTIVE, false);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
TouchPadManager::global_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -56,16 +42,6 @@ void TouchPadPlugin::deactivate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("deactive touchpad plugin.");
|
||||||
|
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_MOUSE_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_touchpad = Gio::Settings::create(MATE_MOUSE_SCHEMA_ID);
|
||||||
|
- if (!mate_touchpad->get_boolean(MATE_MOUSE_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_touchpad->set_boolean(MATE_MOUSE_SCHEMA_KEY_ACTIVE, true);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
TouchPadManager::global_deinit();
|
||||||
|
}
|
||||||
|
-} // namespace Kiran
|
||||||
|
\ No newline at end of file
|
||||||
|
+} // namespace Kiran
|
||||||
|
diff --git a/plugins/keybinding/keybinding-plugin.cpp b/plugins/keybinding/keybinding-plugin.cpp
|
||||||
|
index e2ea9c3..90cc06c 100644
|
||||||
|
--- a/plugins/keybinding/keybinding-plugin.cpp
|
||||||
|
+++ b/plugins/keybinding/keybinding-plugin.cpp
|
||||||
|
@@ -21,9 +21,6 @@
|
||||||
|
|
||||||
|
PLUGIN_EXPORT_FUNC_DEF(KeybindingPlugin);
|
||||||
|
|
||||||
|
-#define MATE_KEYBINDINGS_SCHEMA_ID "org.mate.SettingsDaemon.plugins.keybindings"
|
||||||
|
-#define MATE_KEYBINDINGS_SCHEMA_KEY_ACTIVE "active"
|
||||||
|
-
|
||||||
|
namespace Kiran
|
||||||
|
{
|
||||||
|
KeybindingPlugin::KeybindingPlugin()
|
||||||
|
@@ -38,17 +35,6 @@ void KeybindingPlugin::activate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("active keybinding plugin.");
|
||||||
|
|
||||||
|
- // kiran和mate的相同插件不要同时运行,如果开启了kiran的插件,则将mate的插件停用
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_KEYBINDINGS_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_keybinding = Gio::Settings::create(MATE_KEYBINDINGS_SCHEMA_ID);
|
||||||
|
- if (mate_keybinding->get_boolean(MATE_KEYBINDINGS_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_keybinding->set_boolean(MATE_KEYBINDINGS_SCHEMA_KEY_ACTIVE, false);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
KeybindingManager::global_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -56,16 +42,6 @@ void KeybindingPlugin::deactivate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("deactive keybinding plugin.");
|
||||||
|
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_KEYBINDINGS_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_keybinding = Gio::Settings::create(MATE_KEYBINDINGS_SCHEMA_ID);
|
||||||
|
- if (!mate_keybinding->get_boolean(MATE_KEYBINDINGS_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_keybinding->set_boolean(MATE_KEYBINDINGS_SCHEMA_KEY_ACTIVE, true);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
KeybindingManager::global_deinit();
|
||||||
|
}
|
||||||
|
-} // namespace Kiran
|
||||||
|
\ No newline at end of file
|
||||||
|
+} // namespace Kiran
|
||||||
|
diff --git a/plugins/xsettings/xsettings-plugin.cpp b/plugins/xsettings/xsettings-plugin.cpp
|
||||||
|
index f4d705f..0755a02 100644
|
||||||
|
--- a/plugins/xsettings/xsettings-plugin.cpp
|
||||||
|
+++ b/plugins/xsettings/xsettings-plugin.cpp
|
||||||
|
@@ -21,9 +21,6 @@
|
||||||
|
|
||||||
|
PLUGIN_EXPORT_FUNC_DEF(XSettingsPlugin);
|
||||||
|
|
||||||
|
-#define MATE_XSETTINGS_SCHEMA_ID "org.mate.SettingsDaemon.plugins.xsettings"
|
||||||
|
-#define MATE_XSETTINGS_SCHEMA_KEY_ACTIVE "active"
|
||||||
|
-
|
||||||
|
namespace Kiran
|
||||||
|
{
|
||||||
|
XSettingsPlugin::XSettingsPlugin()
|
||||||
|
@@ -38,17 +35,6 @@ void XSettingsPlugin::activate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("active xsettings plugin.");
|
||||||
|
|
||||||
|
- // kiran和mate的xrandr插件只能运行一个,如果开启了kiran的插件,则将mate的插件停用
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_XSETTINGS_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_xsettings = Gio::Settings::create(MATE_XSETTINGS_SCHEMA_ID);
|
||||||
|
- if (mate_xsettings->get_boolean(MATE_XSETTINGS_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_xsettings->set_boolean(MATE_XSETTINGS_SCHEMA_KEY_ACTIVE, false);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
XSettingsManager::global_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -56,16 +42,6 @@ void XSettingsPlugin::deactivate()
|
||||||
|
{
|
||||||
|
KLOG_PROFILE("deactive xsettings plugin.");
|
||||||
|
|
||||||
|
- auto schemas = Gio::Settings::list_schemas();
|
||||||
|
- if (std::find(schemas.begin(), schemas.end(), MATE_XSETTINGS_SCHEMA_ID) != schemas.end())
|
||||||
|
- {
|
||||||
|
- auto mate_xsettings = Gio::Settings::create(MATE_XSETTINGS_SCHEMA_ID);
|
||||||
|
- if (!mate_xsettings->get_boolean(MATE_XSETTINGS_SCHEMA_KEY_ACTIVE))
|
||||||
|
- {
|
||||||
|
- mate_xsettings->set_boolean(MATE_XSETTINGS_SCHEMA_KEY_ACTIVE, true);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
XSettingsManager::global_deinit();
|
||||||
|
}
|
||||||
|
-} // namespace Kiran
|
||||||
|
\ No newline at end of file
|
||||||
|
+} // namespace Kiran
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
18
99_unikylin-mate-SettingsDaemon-plugins.gschema.override
Normal file
18
99_unikylin-mate-SettingsDaemon-plugins.gschema.override
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[org.mate.SettingsDaemon.plugins.background]
|
||||||
|
active=false
|
||||||
|
|
||||||
|
[org.mate.SettingsDaemon.plugins.xrandr]
|
||||||
|
active=false
|
||||||
|
|
||||||
|
[org.mate.SettingsDaemon.plugins.keybindings]
|
||||||
|
active=false
|
||||||
|
|
||||||
|
[org.mate.SettingsDaemon.plugins.xsettings]
|
||||||
|
active=false
|
||||||
|
|
||||||
|
[org.mate.SettingsDaemon.plugins.keyboard]
|
||||||
|
active=false
|
||||||
|
|
||||||
|
[org.mate.SettingsDaemon.plugins.mouse]
|
||||||
|
active=false
|
||||||
|
|
||||||
@ -1,10 +1,11 @@
|
|||||||
Name: kiran-cc-daemon
|
Name: kiran-cc-daemon
|
||||||
Version: 2.5.1
|
Version: 2.5.1
|
||||||
Release: 26
|
Release: 27
|
||||||
Summary: DBus daemon for Kiran Desktop
|
Summary: DBus daemon for Kiran Desktop
|
||||||
|
|
||||||
License: MulanPSL-2.0
|
License: MulanPSL-2.0
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
Source1: 99_unikylin-mate-SettingsDaemon-plugins.gschema.override
|
||||||
Patch0: 0001-fix-translate-add-some-translation.patch
|
Patch0: 0001-fix-translate-add-some-translation.patch
|
||||||
Patch0001: 0001-fix-keyboard-Add-modifier-lock-window-tips-enable-ke.patch
|
Patch0001: 0001-fix-keyboard-Add-modifier-lock-window-tips-enable-ke.patch
|
||||||
Patch0002: 0001-fix-audio-Fix-coredump-problem-caused-by-nullpointer.patch
|
Patch0002: 0001-fix-audio-Fix-coredump-problem-caused-by-nullpointer.patch
|
||||||
@ -29,6 +30,7 @@ Patch0020: 0001-feature-font-Change-the-default-GTK-application-font.patch
|
|||||||
Patch0021: 0001-fix-power-Fix-related-project-build-with-power-event.patch
|
Patch0021: 0001-fix-power-Fix-related-project-build-with-power-event.patch
|
||||||
Patch0022: 0001-fix-display-Fix-multi-screen-auto-display-while-swit.patch
|
Patch0022: 0001-fix-display-Fix-multi-screen-auto-display-while-swit.patch
|
||||||
Patch0023: 0001-fix-systeminfo-Fix-to-get-pci-info-for-multiple-devi.patch
|
Patch0023: 0001-fix-systeminfo-Fix-to-get-pci-info-for-multiple-devi.patch
|
||||||
|
Patch0024: 0001-fix-plugin-remove-active-or-deactive-mate-plugin-cod.patch
|
||||||
|
|
||||||
BuildRequires: cmake >= 3.2
|
BuildRequires: cmake >= 3.2
|
||||||
BuildRequires: pkgconfig(glibmm-2.4)
|
BuildRequires: pkgconfig(glibmm-2.4)
|
||||||
@ -139,6 +141,7 @@ make %{?_smp_mflags}
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
|
install -D -m 0644 %SOURCE1 %{buildroot}%{_datadir}/glib-2.0/schemas/99_unikylin-mate-SettingsDaemon-plugins.gschema.override
|
||||||
|
|
||||||
%post -n kiran-system-daemon
|
%post -n kiran-system-daemon
|
||||||
%systemd_post kiran-system-daemon.service
|
%systemd_post kiran-system-daemon.service
|
||||||
@ -191,6 +194,7 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || :
|
|||||||
%{_datadir}/kiran-cc-daemon/kiran-session-daemon.gresource
|
%{_datadir}/kiran-cc-daemon/kiran-session-daemon.gresource
|
||||||
%dir %{_datadir}/kiran-cc-daemon/images
|
%dir %{_datadir}/kiran-cc-daemon/images
|
||||||
%{_datadir}/kiran-cc-daemon/images/*.png
|
%{_datadir}/kiran-cc-daemon/images/*.png
|
||||||
|
%{_datadir}/glib-2.0/schemas/99_unikylin-mate-SettingsDaemon-plugins.gschema.override
|
||||||
|
|
||||||
%files common
|
%files common
|
||||||
%{_includedir}/kiran-cc-daemon/error-i.h
|
%{_includedir}/kiran-cc-daemon/error-i.h
|
||||||
@ -210,6 +214,10 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || :
|
|||||||
%{_libdir}/pkgconfig/kiran-cc-daemon.pc
|
%{_libdir}/pkgconfig/kiran-cc-daemon.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 18 2023 yuanxing <yuanxing@kylinsec.com.cn> - 2.5.1-27
|
||||||
|
- KYOS-F: add mate settings daemon plugin gschema override file
|
||||||
|
- KYOS-F: remove active/deactive mate setting daemon plugin code
|
||||||
|
|
||||||
* Mon Sep 11 2023 longcheng <longcheng@kylinsec.com.cn> - 2.5.1-26
|
* Mon Sep 11 2023 longcheng <longcheng@kylinsec.com.cn> - 2.5.1-26
|
||||||
- KYOS-B: change BuildRequires in redhat 7 (#14460)
|
- KYOS-B: change BuildRequires in redhat 7 (#14460)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user