diff --git a/disable-Time-to-sleep-of-kylin.patch b/disable-Time-to-sleep-of-kylin.patch new file mode 100644 index 0000000000000000000000000000000000000000..9fe3373db940c45604a27e81ef73517301e2062c --- /dev/null +++ b/disable-Time-to-sleep-of-kylin.patch @@ -0,0 +1,58 @@ +From 6228f293811cb8e37dc55af92372e81838cb38ad Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Sun, 18 Jun 2023 11:36:28 +0800 +Subject: [PATCH] disable Time to sleep of kylin + +--- + plugins/system/power/power.cpp | 4 ++++ + shell/utils/utils.cpp | 10 ++++++++++ + shell/utils/utils.h | 1 + + 3 files changed, 14 insertions(+) + +diff --git a/plugins/system/power/power.cpp b/plugins/system/power/power.cpp +index 62aae31..ee61ceb 100644 +--- a/plugins/system/power/power.cpp ++++ b/plugins/system/power/power.cpp +@@ -535,6 +535,10 @@ void Power::InitUI(QWidget *widget) + mverticalLayout->addStretch(); + + retranslateUi(); ++ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){ ++ mSleepLabel->hide(); ++ mSleepComboBox->hide(); ++ } + } + + void Power::retranslateUi() +diff --git a/shell/utils/utils.cpp b/shell/utils/utils.cpp +index 24d5f56..d61994e 100644 +--- a/shell/utils/utils.cpp ++++ b/shell/utils/utils.cpp +@@ -264,3 +264,13 @@ bool Utils::isZJY() + } + return true; + } ++ ++QString Utils::getCommunity() ++{ ++ QString filename = "/etc/os-release"; ++ QSettings osSettings(filename, QSettings::IniFormat); ++ ++ QString versionID = osSettings.value("ID").toString(); ++ ++ return versionID; ++} +diff --git a/shell/utils/utils.h b/shell/utils/utils.h +index c905ff4..71fb3bd 100644 +--- a/shell/utils/utils.h ++++ b/shell/utils/utils.h +@@ -49,5 +49,6 @@ namespace Utils + bool isTablet(); + bool isZJY(); + QString getHostName(); ++ QString getCommunity(); + } + #endif // UTILS_H +-- +2.33.0 + diff --git a/ukui-control-center.spec b/ukui-control-center.spec index 50a4ce7cacceb4761562c3b919129af171476761..0b7fcf98adf3b82917c16a75f5426801afb52644 100644 --- a/ukui-control-center.spec +++ b/ukui-control-center.spec @@ -1,6 +1,6 @@ Name: ukui-control-center Version: 3.1.2 -Release: 18 +Release: 19 Summary: utilities to configure the UKUI desktop License: GPL-2+ URL: http://www.ukui.org @@ -19,6 +19,7 @@ Patch14: 0014-fix-memorysize-of-aboutinfo.patch Patch15: fix-changeOtherUserPasswd-critical-vulnerabilities.patch Patch16: fix-createuser-critical-vulnerabilities.patch Patch17: ukui-control-center-3.1.2-fix-password-changes-for-this-user-and-for-other-use.patch +Patch18: disable-Time-to-sleep-of-kylin.patch BuildRequires: qt5-qtsvg-devel BuildRequires: gsettings-qt-devel @@ -143,6 +144,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jun 18 2023 peijiankang - 3.1.2-19 +- Type:Bugfix +- ID:NA +- SUG:NA +- DESC: add disable-Time-to-sleep-of-kylin.patch + * Fri Jun 09 2023 huayadong - 3.1.2-18 - fix password changes for this user and for other use