!172 disable-Time-to-sleep-of-kylin
From: @hua_yadong Reviewed-by: @peijiankang Signed-off-by: @peijiankang
This commit is contained in:
commit
61b128150b
58
disable-Time-to-sleep-of-kylin.patch
Normal file
58
disable-Time-to-sleep-of-kylin.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
From 6228f293811cb8e37dc55af92372e81838cb38ad Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
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
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: ukui-control-center
|
Name: ukui-control-center
|
||||||
Version: 3.1.2
|
Version: 3.1.2
|
||||||
Release: 20
|
Release: 21
|
||||||
Summary: utilities to configure the UKUI desktop
|
Summary: utilities to configure the UKUI desktop
|
||||||
License: GPL-2+
|
License: GPL-2+
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
@ -20,6 +20,7 @@ Patch15: fix-changeOtherUserPasswd-critical-vulnerabilities.patch
|
|||||||
Patch16: fix-createuser-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
|
Patch17: ukui-control-center-3.1.2-fix-password-changes-for-this-user-and-for-other-use.patch
|
||||||
Patch18: fix-ukui-control-center-3.1.2-activation-button-display-error.patch
|
Patch18: fix-ukui-control-center-3.1.2-activation-button-display-error.patch
|
||||||
|
Patch19: disable-Time-to-sleep-of-kylin.patch
|
||||||
|
|
||||||
BuildRequires: qt5-qtsvg-devel
|
BuildRequires: qt5-qtsvg-devel
|
||||||
BuildRequires: gsettings-qt-devel
|
BuildRequires: gsettings-qt-devel
|
||||||
@ -139,6 +140,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jun 18 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-21
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: add disable-Time-to-sleep-of-kylin.patch
|
||||||
|
|
||||||
* Sat Jun 17 2023 huayadong <huayadong@kylinos.cn> - 3.1.2-20
|
* Sat Jun 17 2023 huayadong <huayadong@kylinos.cn> - 3.1.2-20
|
||||||
- remove Requires: kylin-nm ukui-bluetooth
|
- remove Requires: kylin-nm ukui-bluetooth
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user