update dde-control-center package

This commit is contained in:
liuzhilin 2023-12-04 10:16:08 +08:00 committed by yangxiaoxuan
parent 7783463e75
commit afe2e417e4
18 changed files with 2033 additions and 366 deletions

31
0001-feat-root.patch Normal file
View File

@ -0,0 +1,31 @@
From 427b261b78aedd9f04f690e20e773bbc9fd60432 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Sun, 23 Apr 2023 10:14:14 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A7=E5=88=B6=E4=B8=AD=E5=BF=83roo?=
=?UTF-8?q?t=E7=94=A8=E6=88=B7=E6=97=A0=E6=B3=95=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=85=B6=E4=BB=96=E7=94=A8=E6=88=B7=E7=9A=84=E5=AF=86=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/frame/modules/accounts/accountsworker.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/frame/modules/accounts/accountsworker.cpp b/src/frame/modules/accounts/accountsworker.cpp
index b57ad5d..a0654e1 100644
--- a/src/frame/modules/accounts/accountsworker.cpp
+++ b/src/frame/modules/accounts/accountsworker.cpp
@@ -532,7 +532,8 @@ void AccountsWorker::deleteUserIcon(User *user, const QString &iconPath)
void AccountsWorker::addUser(const QString &userPath)
{
- if (userPath.contains("User0", Qt::CaseInsensitive) || m_userModel->contains(userPath))
+ //服务器版本需要root用户信息及相关流程
+ if ((!IsServerSystem && userPath.contains("User0", Qt::CaseInsensitive)) || m_userModel->contains(userPath))
return;
AccountsUser *userInter = new AccountsUser(AccountsService, userPath, QDBusConnection::systemBus(), this);
userInter->setSync(false);
--
2.20.1

File diff suppressed because it is too large Load Diff

View File

@ -1,38 +0,0 @@
From 53dfbe39bdc60a54a7f6cd03fb4f4687c7c5d6ac Mon Sep 17 00:00:00 2001
From: desert-sailor <dxwangk@isoftstone.com>
Date: Tue, 11 Apr 2023 10:51:39 +0800
Subject: [PATCH] [PATCH] bugfix for issue:I6QIOR modify passwd no check
newpassword
---
.../window/modules/accounts/modifypasswdpage.cpp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/frame/window/modules/accounts/modifypasswdpage.cpp b/src/frame/window/modules/accounts/modifypasswdpage.cpp
index ff33149..e2f9d77 100644
--- a/src/frame/window/modules/accounts/modifypasswdpage.cpp
+++ b/src/frame/window/modules/accounts/modifypasswdpage.cpp
@@ -157,6 +157,20 @@ void ModifyPasswdPage::clickSaveBtn()
{
//校验输入密码
if (judgeTextEmpty(m_oldPasswordEdit)) return;
+ if (judgeTextEmpty(m_newPasswordEdit)) return;
+
+ if (m_newPasswordEdit->lineEdit()->text() == m_oldPasswordEdit->lineEdit()->text() ) {
+ m_newPasswordEdit->setAlert(true);
+ m_newPasswordEdit->showAlertMessage(tr("New password should differ from the current one"), m_oldPasswordEdit, 2000);
+ return;
+ }
+
+ if (judgeTextEmpty(m_repeatPasswordEdit)) return;
+ if (m_newPasswordEdit->lineEdit()->text() != m_repeatPasswordEdit->lineEdit()->text()) {
+ m_repeatPasswordEdit->setAlert(true);
+ m_repeatPasswordEdit->showAlertMessage(tr("Passwords do not match"), m_repeatPasswordEdit, 2000);
+ return;
+ }
Q_EMIT requestChangePassword(m_curUser, m_oldPasswordEdit->lineEdit()->text(), m_newPasswordEdit->lineEdit()->text(), m_repeatPasswordEdit->lineEdit()->text());
}
--
2.33.0

View File

@ -0,0 +1,31 @@
From 8186e031531b6e09e2c633c57d632a73786c6953 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Wed, 4 Jan 2023 13:27:37 +0800
Subject: [PATCH] dde-control-center uos open activate button for 1050a
---
src/frame/window/modules/systeminfo/nativeinfowidget.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
index 754edd9..7c6c1b5 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
@@ -202,11 +202,12 @@ void NativeInfoWidget::initWidget()
m_authorized->setValue(tr("To be activated"));
m_authorized->setValueForegroundRole(QColor(255, 0, 0));
m_authorized->setButtonText(tr("Activate"));
- if (DSysInfo::uosEditionType() == DSysInfo::UosEnterpriseC) {
+ /*if (DSysInfo::uosEditionType() == DSysInfo::UosEnterpriseC) {
m_authorized->setVisable(false);
} else {
m_authorized->setVisable(true);
- }
+ }*/
+ m_authorized->setVisable(true);
m_kernel = new TitleValueItem(frame);
//~ contents_path /systeminfo/About This PC
--
2.20.1

View File

@ -0,0 +1,50 @@
From 263559ccfd3615ed1f7f733456f73c54ef364101 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Wed, 1 Feb 2023 13:40:57 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=B3=E9=97=AD=E7=AA=97=E5=8F=A3?=
=?UTF-8?q?=E7=A7=BB=E5=8A=A8=E6=97=B6=E5=90=AF=E7=94=A8=E9=80=8F=E6=98=8E?=
=?UTF-8?q?=E7=89=B9=E6=95=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../window/modules/personalization/personalizationgeneral.cpp | 2 ++
.../window/modules/personalization/personalizationgeneral.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/frame/window/modules/personalization/personalizationgeneral.cpp b/src/frame/window/modules/personalization/personalizationgeneral.cpp
index 13e7b65..137c165 100644
--- a/src/frame/window/modules/personalization/personalizationgeneral.cpp
+++ b/src/frame/window/modules/personalization/personalizationgeneral.cpp
@@ -493,11 +493,13 @@ void PersonalizationGeneral::paintEvent(QPaintEvent *event)
}
}
+#if 0
void PersonalizationGeneral::resizeEvent(QResizeEvent *event)
{
m_windowMovedLabel->setText(QFontMetrics(m_windowMovedLabel->font()).elidedText(m_displayData, Qt::ElideRight, event->size().width() >= 430 ? 500 : 280));
QWidget::resizeEvent(event);
}
+#endif
void PersonalizationGeneral::updateActiveColors(RoundColorWidget *selectedWidget)
{
diff --git a/src/frame/window/modules/personalization/personalizationgeneral.h b/src/frame/window/modules/personalization/personalizationgeneral.h
index b4856bb..00809fa 100644
--- a/src/frame/window/modules/personalization/personalizationgeneral.h
+++ b/src/frame/window/modules/personalization/personalizationgeneral.h
@@ -76,7 +76,9 @@ public:
protected:
void paintEvent(QPaintEvent *event);
+#if 0
void resizeEvent(QResizeEvent *event) override;
+#endif
private:
void updateActiveColors(RoundColorWidget *selectedWidget);
--
2.20.1

View File

@ -1,56 +0,0 @@
From 232b34bc0ae1e2fb3ea258d9e33a04fcbcf793b6 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Thu, 8 Jun 2023 14:26:53 +0800
Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F?=
=?UTF-8?q?=E7=89=88=E6=9C=AC=E8=8E=B7=E5=8F=96=E9=94=99=E8=AF=AF=E5=90=8E?=
=?UTF-8?q?=E6=8E=A7=E5=88=B6=E4=B8=AD=E5=BF=83=E8=BF=9B=E5=85=A5=E7=B3=BB?=
=?UTF-8?q?=E7=BB=9F=E4=BF=A1=E6=81=AF=E5=B4=A9=E6=BA=83=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../window/modules/systeminfo/nativeinfowidget.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
index d7db8d6..7bfdfc8 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
@@ -85,6 +85,12 @@ NativeInfoWidget::NativeInfoWidget(SystemInfoModel *model, QWidget *parent)
, m_mainLayout(new QVBoxLayout(this))
, m_hostNameLayout(new QHBoxLayout(this))
, m_hostNameSettingItem(new SettingsItem(this))
+ , m_hostNameTitleLabel(nullptr)
+ , m_hostNameLabel(nullptr)
+ , m_hostNameBtn(nullptr)
+ , m_hostNameLineEdit(nullptr)
+ , m_productName(nullptr)
+ , m_versionNumber(nullptr)
, isContensServers(false)
{
initWidget();
@@ -304,7 +310,7 @@ void NativeInfoWidget::resizeEvent(QResizeEvent *event)
{
ContentWidget::resizeEvent(event);
- if(m_hostNameLineEdit->isAlert()) {
+ if(m_hostNameLineEdit && m_hostNameLineEdit->isAlert()) {
m_hostNameLineEdit->hideAlertMessage();
m_hostNameLineEdit->showAlertMessage(m_alertMessage,this);
}
@@ -374,9 +380,9 @@ const QString NativeInfoWidget::systemCopyright() const
if (oem_copyright.isEmpty()) {
if (DSysInfo::isCommunityEdition())
- return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2011-%1 Deepin Community").arg(2022);
+ return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2011-%1 Deepin Community").arg(QString(__DATE__).right(4));
else
- return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2019-%1 UnionTech Software Technology Co., LTD").arg(2022);
+ return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2019-%1 UnionTech Software Technology Co., LTD").arg(QString(__DATE__).right(4));
} else {
return oem_copyright;
}
--
2.20.1

View File

@ -0,0 +1,24 @@
From d59f4e1bb7972884eff879f7be6810b2b3310c85 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Thu, 2 Feb 2023 16:38:14 +0800
Subject: [PATCH] feat: add setVersion
---
src/frame/modules/systeminfo/systeminfowork.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/frame/modules/systeminfo/systeminfowork.cpp b/src/frame/modules/systeminfo/systeminfowork.cpp
index 20b280c..5b1ce99 100644
--- a/src/frame/modules/systeminfo/systeminfowork.cpp
+++ b/src/frame/modules/systeminfo/systeminfowork.cpp
@@ -167,6 +167,7 @@ void SystemInfoWork::activate()
version = QString("%1 %2").arg(DSysInfo::productVersion())
.arg(DSysInfo::productTypeString());
}
+ m_model->setVersion(version);
m_model->setType(QSysInfo::WordSize);
if (m_systemInfo->isValid()) {
--
2.20.1

View File

@ -1,14 +1,14 @@
From 80e9d14a6f529fd3bccd0dd90fafb7b4fb82bb0b Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Thu, 8 Jun 2023 14:27:41 +0800
Subject: [PATCH 2/2] fix: hide commoninfo and end-user-license-agreement
From 1834aef3bac001345dc6fdf2629022088746f69b Mon Sep 17 00:00:00 2001
From: leeffo <liweiganga@uniontech.com>
Date: Wed, 2 Aug 2023 10:37:41 +0800
Subject: [PATCH] hide commonifo and end-user-license-agreement
---
com.deepin.dde.control-center.gschema.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/com.deepin.dde.control-center.gschema.xml b/com.deepin.dde.control-center.gschema.xml
index 5b2a70f..6b330d2 100644
index b18fa11..784db01 100644
--- a/com.deepin.dde.control-center.gschema.xml
+++ b/com.deepin.dde.control-center.gschema.xml
@@ -39,7 +39,7 @@
@ -20,7 +20,7 @@ index 5b2a70f..6b330d2 100644
<summary>The module to display</summary>
</key>
<key name="show-createuser" type="b">
@@ -720,7 +720,7 @@
@@ -748,7 +748,7 @@
<description>default is true</description>
</key>
<key name="end-user-license-agreement" type="b">

View File

@ -0,0 +1,129 @@
From 778442f97f0af8631980f4dc75ee264c448b8d6e Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Thu, 16 Feb 2023 14:48:33 +0800
Subject: [PATCH] dde-control-center uos add Free license
---
include/widgets/utils.h | 3 ++-
src/frame/modules/systeminfo/systeminfomodel.h | 3 ++-
src/frame/window/modules/systeminfo/nativeinfowidget.cpp | 4 ++++
translations/dde-control-center_zh_CN.ts | 7 ++++++-
translations/dde-control-center_zh_HK.ts | 7 ++++++-
translations/dde-control-center_zh_TW.ts | 7 ++++++-
6 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/include/widgets/utils.h b/include/widgets/utils.h
index 1387ada..45debcc 100644
--- a/include/widgets/utils.h
+++ b/include/widgets/utils.h
@@ -39,7 +39,8 @@ enum UiActiveState {
Authorized, //已授权
AuthorizedLapse, //授权失效
TrialAuthorized, //试用期已授权
- TrialExpired //试用期已过期
+ TrialExpired, //试用期已过期
+ FreeLicenseAuthorized = 5 //商业免费授权
};
inline bool isFileExist(const QString &path){
diff --git a/src/frame/modules/systeminfo/systeminfomodel.h b/src/frame/modules/systeminfo/systeminfomodel.h
index 8cdb1fa..401c76f 100644
--- a/src/frame/modules/systeminfo/systeminfomodel.h
+++ b/src/frame/modules/systeminfo/systeminfomodel.h
@@ -19,7 +19,8 @@ enum ActiveState {
Authorized, //已授权
AuthorizedLapse, //授权失效
TrialAuthorized, //试用期已授权
- TrialExpired //试用期已过期
+ TrialExpired, //试用期已过期
+ FreeLicenseAuthorized = 5 //商业免费授权
};
class SystemInfoModel : public QObject
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
index 7c6c1b5..771bb57 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
@@ -357,6 +357,10 @@ void NativeInfoWidget::setLicenseState(ActiveState state)
m_authorized->setValue(tr("Trial expired"));
m_authorized->setValueForegroundRole(QColor(255, 87, 54));
m_authorized->setButtonText(tr("Activate"));
+ } else if (state == FreeLicenseAuthorized) {
+ m_authorized->setValue(tr("Free license"));
+ m_authorized->setValueForegroundRole(QColor(21, 187, 24));
+ m_authorized->setButtonText(tr("View"));
}
}
diff --git a/translations/dde-control-center_zh_CN.ts b/translations/dde-control-center_zh_CN.ts
index 2ce90ac..3d5e66b 100644
--- a/translations/dde-control-center_zh_CN.ts
+++ b/translations/dde-control-center_zh_CN.ts
@@ -4511,6 +4511,11 @@
<source>Activate</source>
<translation>激活</translation>
</message>
+ <message>
+ <location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="362"/>
+ <source>Free license</source>
+ <translation>免费授权</translation>
+ </message>
<message>
<location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="214"/>
<source>Kernel</source>
@@ -6488,4 +6493,4 @@ UnionTech Software is committed to research and improve the security, accuracy a
<translation>控制中心提供操作系统的所有设置选项。</translation>
</message>
</context>
-</TS>
\ No newline at end of file
+</TS>
diff --git a/translations/dde-control-center_zh_HK.ts b/translations/dde-control-center_zh_HK.ts
index 9ba8c3a..2adaccd 100644
--- a/translations/dde-control-center_zh_HK.ts
+++ b/translations/dde-control-center_zh_HK.ts
@@ -4511,6 +4511,11 @@
<source>Activate</source>
<translation>啟用</translation>
</message>
+ <message>
+ <location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="362"/>
+ <source>Free license</source>
+ <translation>免費授權</translation>
+ </message>
<message>
<location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="214"/>
<source>Kernel</source>
@@ -6488,4 +6493,4 @@ UnionTech Software is committed to research and improve the security, accuracy a
<translation>控制中心提供操作系統的所有設置選項。</translation>
</message>
</context>
-</TS>
\ No newline at end of file
+</TS>
diff --git a/translations/dde-control-center_zh_TW.ts b/translations/dde-control-center_zh_TW.ts
index 23f6817..de875ec 100644
--- a/translations/dde-control-center_zh_TW.ts
+++ b/translations/dde-control-center_zh_TW.ts
@@ -4511,6 +4511,11 @@
<source>Activate</source>
<translation>啟用</translation>
</message>
+ <message>
+ <location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="362"/>
+ <source>Free license</source>
+ <translation>免費授權</translation>
+ </message>
<message>
<location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="214"/>
<source>Kernel</source>
@@ -6488,4 +6493,4 @@ UnionTech Software is committed to research and improve the security, accuracy a
<translation>《控制中心》提供系統設定選項。</translation>
</message>
</context>
-</TS>
\ No newline at end of file
+</TS>
--
2.20.1

View File

@ -0,0 +1,25 @@
From 9f8b031614a9c29a57dd0ad97ef672453c9e4442 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Wed, 1 Mar 2023 14:19:19 +0800
Subject: [PATCH] feat: hidden power-press-powerbtn
---
com.deepin.dde.control-center.gschema.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/com.deepin.dde.control-center.gschema.xml b/com.deepin.dde.control-center.gschema.xml
index c6e1d49..58bd4c1 100644
--- a/com.deepin.dde.control-center.gschema.xml
+++ b/com.deepin.dde.control-center.gschema.xml
@@ -212,7 +212,7 @@
<description>default is Enabled</description>
</key>
<key name="power-press-powerbtn" enum="com.deepin.dde.control-center.StatusMode">
- <default>'Enabled'</default>
+ <default>'Hidden'</default>
<summary>change power press powerbtn status</summary>
<description>default is Enabled</description>
</key>
--
2.20.1

View File

@ -0,0 +1,28 @@
From 77e3cdac535359ec5e6f013702653675ab448d80 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Wed, 8 Mar 2023 11:21:10 +0800
Subject: [PATCH] feat: modify copyright read current year
---
src/frame/window/modules/systeminfo/nativeinfowidget.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
index 771bb57..3ba9b1f 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
@@ -371,9 +371,9 @@ const QString NativeInfoWidget::systemCopyright() const
if (oem_copyright.isEmpty()) {
if (DSysInfo::isCommunityEdition())
- return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2011-%1 Deepin Community").arg(2022);
+ return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2011-%1 Deepin Community").arg(QString(__DATE__).right(4));
else
- return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2019-%1 UnionTech Software Technology Co., LTD").arg(2022);
+ return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2019-%1 UnionTech Software Technology Co., LTD").arg(QString(__DATE__).right(4));
} else {
return oem_copyright;
}
--
2.20.1

View File

@ -0,0 +1,25 @@
From d9f1a109f90f61dd917ad3ddce5894580086340e Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Mon, 12 Jun 2023 15:45:47 +0800
Subject: [PATCH] fix: Array out of bounds causes crash handling
---
src/frame/window/modules/systeminfo/systeminfowidget.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/frame/window/modules/systeminfo/systeminfowidget.cpp b/src/frame/window/modules/systeminfo/systeminfowidget.cpp
index 6313841..0f06271 100644
--- a/src/frame/window/modules/systeminfo/systeminfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/systeminfowidget.cpp
@@ -89,7 +89,7 @@ void SystemInfoWidget::initData()
if (IsServerSystem) {
connect(GSettingWatcher::instance(),
&GSettingWatcher::requestShowSecondMenu, this, [this](int row) {
- if (m_itemList[row].gsettingsName == "editionLicense") {
+ if (m_itemList.size() > row && m_itemList[row].gsettingsName == "editionLicense") {
m_listView->setRowHidden(row, true);
}
});
--
2.20.1

View File

@ -1,30 +1,32 @@
From cf9e61a42436a5eeea0aeccd702a477aa8ca3d9a Mon Sep 17 00:00:00 2001
From: leeffo <loong_c@yeah.net>
Date: Tue, 23 Aug 2022 16:33:21 +0800
Subject: [PATCH] hide authorized
From 4815b66c57916eaa17fa66d97211db1bc27eb411 Mon Sep 17 00:00:00 2001
From: leeffo <liweiganga@uniontech.com>
Date: Thu, 7 Sep 2023 09:33:11 +0800
Subject: [PATCH] hide activate function
---
src/frame/CMakeLists.txt | 1 +
.../modules/systeminfo/systeminfomodel.cpp | 5 ++++-
.../modules/systeminfo/systeminfomodel.h | 12 ++++++++++
.../modules/systeminfo/systeminfowork.cpp | 6 +++++
.../modules/systeminfo/systeminfomodel.cpp | 4 ++++
.../modules/systeminfo/systeminfomodel.h | 12 +++++++++++
.../modules/systeminfo/systeminfowork.cpp | 8 ++++++-
src/frame/modules/systeminfo/systeminfowork.h | 4 ++++
src/frame/modules/update/updatemodel.cpp | 4 ++++
src/frame/modules/update/updatemodel.h | 6 +++++
src/frame/modules/update/updatemodel.h | 6 ++++++
src/frame/modules/update/updatework.cpp | 4 ++++
src/frame/modules/update/updatework.h | 4 ++++
.../modules/systeminfo/nativeinfowidget.cpp | 14 ++++++++++++
.../modules/systeminfo/nativeinfowidget.h | 6 +++++
.../modules/systeminfo/nativeinfowidget.cpp | 14 +++++++++++++
.../modules/systeminfo/nativeinfowidget.h | 6 ++++++
.../modules/systeminfo/systeminfomodule.cpp | 2 ++
.../modules/update/updatectrlwidget.cpp | 22 +++++++++++++++++++
.../window/modules/update/updatectrlwidget.h | 6 +++++
.../window/modules/update/updatemodule.cpp | 6 ++++-
15 files changed, 100 insertions(+), 2 deletions(-)
.../modules/update/updatectrlwidget.cpp | 21 ++++++++++++++++++-
.../window/modules/update/updatectrlwidget.h | 6 ++++++
.../window/modules/update/updatemodule.cpp | 4 +++-
15 files changed, 97 insertions(+), 3 deletions(-)
diff --git a/src/frame/CMakeLists.txt b/src/frame/CMakeLists.txt
index 319ca1d..9b7638b 100644
index a5c64d0..288ef7f 100644
--- a/src/frame/CMakeLists.txt
+++ b/src/frame/CMakeLists.txt
@@ -30,6 +30,7 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
endif ()
@@ -28,6 +28,7 @@ endif()
set(DEFINED_LIST
+DISABLE_ACTIVATOR
@ -32,10 +34,10 @@ index 319ca1d..9b7638b 100644
DISABLE_CLOUD_SYNC
DISABLE_SYS_UPDATE
diff --git a/src/frame/modules/systeminfo/systeminfomodel.cpp b/src/frame/modules/systeminfo/systeminfomodel.cpp
index c890183..20da279 100644
index 4965879..3488577 100644
--- a/src/frame/modules/systeminfo/systeminfomodel.cpp
+++ b/src/frame/modules/systeminfo/systeminfomodel.cpp
@@ -60,7 +60,9 @@ SystemInfoModel::SystemInfoModel(QObject *parent)
@@ -39,7 +39,9 @@ SystemInfoModel::SystemInfoModel(QObject *parent)
, m_themeEnabled(false)
, m_updating(false)
, m_type(64)
@ -45,7 +47,7 @@ index c890183..20da279 100644
{
}
@@ -227,6 +229,7 @@ void SystemInfoModel::setKernel(const QString &kernel)
@@ -206,6 +208,7 @@ void SystemInfoModel::setKernel(const QString &kernel)
kernelChanged(kernel);
}
@ -53,19 +55,19 @@ index c890183..20da279 100644
void SystemInfoModel::setLicenseState(ActiveState state)
{
if (m_licenseState != state) {
@@ -234,6 +237,6 @@ void SystemInfoModel::setLicenseState(ActiveState state)
@@ -213,6 +216,7 @@ void SystemInfoModel::setLicenseState(ActiveState state)
Q_EMIT licenseStateChanged(state);
}
}
-
+#endif
}
}
diff --git a/src/frame/modules/systeminfo/systeminfomodel.h b/src/frame/modules/systeminfo/systeminfomodel.h
index 7ae81e0..ce4dfb9 100644
index 401c76f..0c7006c 100644
--- a/src/frame/modules/systeminfo/systeminfomodel.h
+++ b/src/frame/modules/systeminfo/systeminfomodel.h
@@ -34,6 +34,7 @@ namespace systeminfo{
@@ -13,6 +13,7 @@ namespace systeminfo{
// !!! 不要用C++11的前置声明枚举类型这里lupdate命令有个bug具体见
// https://stackoverflow.com/questions/6504902/lupdate-error-qualifying-with-unknown-namespace-class
@ -73,15 +75,15 @@ index 7ae81e0..ce4dfb9 100644
//授权状态
enum ActiveState {
Unauthorized = 0, //未授权
@@ -42,6 +43,7 @@ enum ActiveState {
TrialAuthorized, //试用期已授权
TrialExpired //试用期已过期
@@ -22,6 +23,7 @@ enum ActiveState {
TrialExpired, //试用期已过期
FreeLicenseAuthorized = 5 //商业免费授权
};
+#endif
class SystemInfoModel : public QObject
{
@@ -65,7 +67,9 @@ public:
@@ -45,7 +47,9 @@ public:
QString kernel() const { return m_kernel;}
QString hostName() const { return m_hostName;}
@ -91,7 +93,7 @@ index 7ae81e0..ce4dfb9 100644
bool bootDelay() const;
bool themeEnabled() const { return m_themeEnabled; }
@@ -90,7 +94,9 @@ Q_SIGNALS:
@@ -70,7 +74,9 @@ Q_SIGNALS:
void memoryChanged(const QString& memory);
void diskChanged(const QString& disk);
void kernelChanged(const QString& kernel);
@ -101,7 +103,7 @@ index 7ae81e0..ce4dfb9 100644
void hostNameChanged(const QString& hostName);
void setHostNameChanged(const QString& hostName);
void setHostNameError(const QString& error);
@@ -110,7 +116,9 @@ public Q_SLOTS:
@@ -90,7 +96,9 @@ public Q_SLOTS:
void setMemory(qulonglong totalMemory, qulonglong installedMemory);
void setDisk(qulonglong disk);
void setKernel(const QString &kernel);
@ -111,7 +113,7 @@ index 7ae81e0..ce4dfb9 100644
void setHostName(const QString& hostName);
private:
@@ -132,12 +140,16 @@ private:
@@ -112,12 +120,16 @@ private:
QString m_disk;
QString m_kernel;
QString m_hostName;
@ -129,10 +131,10 @@ index 7ae81e0..ce4dfb9 100644
#endif // SYSTEMINFOMODEL_H
diff --git a/src/frame/modules/systeminfo/systeminfowork.cpp b/src/frame/modules/systeminfo/systeminfowork.cpp
index 4173622..a688706 100644
index 5b1ce99..e0465d2 100644
--- a/src/frame/modules/systeminfo/systeminfowork.cpp
+++ b/src/frame/modules/systeminfo/systeminfowork.cpp
@@ -111,12 +111,14 @@ SystemInfoWork::SystemInfoWork(SystemInfoModel *model, QObject *parent)
@@ -90,12 +90,14 @@ SystemInfoWork::SystemInfoWork(SystemInfoModel *model, QObject *parent)
m_dbusGrubTheme->setSync(false, false);
m_dbusHostName->setSync(false, false);
@ -147,7 +149,7 @@ index 4173622..a688706 100644
connect(m_dbusGrub, &GrubDbus::DefaultEntryChanged, m_model, &SystemInfoModel::setDefaultEntry);
connect(m_dbusGrub, &GrubDbus::EnableThemeChanged, m_model, &SystemInfoModel::setThemeEnabled);
@@ -160,7 +162,9 @@ SystemInfoWork::SystemInfoWork(SystemInfoModel *model, QObject *parent)
@@ -139,7 +141,9 @@ SystemInfoWork::SystemInfoWork(SystemInfoModel *model, QObject *parent)
void SystemInfoWork::activate()
{
@ -157,15 +159,15 @@ index 4173622..a688706 100644
m_model->setDistroID(m_systemInfoInter->distroID());
m_model->setDistroVer(m_systemInfoInter->distroVer());
m_model->setDisk(m_systemInfoInter->diskCap());
@@ -309,6 +313,7 @@ void SystemInfoWork::setBackground(const QString &path)
});
@@ -320,6 +324,7 @@ void SystemInfoWork::setBackground(const QString &path)
#endif
}
+#ifndef DISABLE_ACTIVATOR
void SystemInfoWork::showActivatorDialog()
{
QDBusInterface activator("com.deepin.license.activator",
@@ -327,6 +332,7 @@ void SystemInfoWork::licenseStateChangeSlot()
@@ -338,6 +343,7 @@ void SystemInfoWork::licenseStateChangeSlot()
QFuture<void> future = QtConcurrent::run(this, &SystemInfoWork::getLicenseState);
watcher->setFuture(future);
}
@ -173,11 +175,27 @@ index 4173622..a688706 100644
void SystemInfoWork::getEntryTitles()
{
@@ -399,6 +405,7 @@ void SystemInfoWork::getLicenseState()
qDebug() << "authorize result:" << reply;
m_model->setLicenseState(reply);
}
+#endif
unsigned int SystemInfoWork::getLicenseAuthorizationProperty()
{
@@ -414,7 +421,6 @@ unsigned int SystemInfoWork::getLicenseAuthorizationProperty()
return licenseInfo.property("AuthorizationProperty").value<unsigned int>();
}
-#endif
}
}
diff --git a/src/frame/modules/systeminfo/systeminfowork.h b/src/frame/modules/systeminfo/systeminfowork.h
index f092cdf..e3466f0 100644
index 284a6a5..b9887f5 100644
--- a/src/frame/modules/systeminfo/systeminfowork.h
+++ b/src/frame/modules/systeminfo/systeminfowork.h
@@ -64,14 +64,18 @@ public Q_SLOTS:
@@ -50,15 +50,19 @@ public Q_SLOTS:
void grubServerFinished();
void onBackgroundChanged();
void setBackground(const QString &path);
@ -186,6 +204,7 @@ index f092cdf..e3466f0 100644
void licenseStateChangeSlot();
+#endif
void processChanged(QDBusMessage msg);
void onLicenseAuthorizationProperty(void);
private:
void getEntryTitles();
@ -193,24 +212,24 @@ index f092cdf..e3466f0 100644
+#ifndef DISABLE_ACTIVATOR
void getLicenseState();
+#endif
unsigned int getLicenseAuthorizationProperty();
private:
SystemInfoModel* m_model;
diff --git a/src/frame/modules/update/updatemodel.cpp b/src/frame/modules/update/updatemodel.cpp
index 378f33d..4fcc591 100644
index a01e711..fe2c45b 100644
--- a/src/frame/modules/update/updatemodel.cpp
+++ b/src/frame/modules/update/updatemodel.cpp
@@ -69,7 +69,9 @@ UpdateModel::UpdateModel(QObject *parent)
@@ -64,7 +64,9 @@ UpdateModel::UpdateModel(QObject *parent)
, m_bRecoverRestoring(false)
, m_systemVersionInfo("")
, m_systemVersionInfo(QString())
, m_metaEnum(QMetaEnum::fromType<ModelUpdatesStatus>())
+#ifndef DISABLE_ACTIVATOR
, m_bSystemActivation(UiActiveState::Unknown)
+#endif
, m_lastCheckUpdateTime(QString())
, m_autoCheckUpdateCircle(0)
, m_isUpdatablePackages(false)
@@ -353,6 +355,7 @@ void UpdateModel::setSystemVersionInfo(const QString &systemVersionInfo)
, m_testingChannelServer(QString())
@@ -411,6 +413,7 @@ void UpdateModel::setSystemVersionInfo(const QString &systemVersionInfo)
Q_EMIT systemVersionChanged(systemVersionInfo);
}
@ -218,7 +237,7 @@ index 378f33d..4fcc591 100644
void UpdateModel::setSystemActivation(const UiActiveState &systemactivation)
{
if (m_bSystemActivation == systemactivation) {
@@ -362,6 +365,7 @@ void UpdateModel::setSystemActivation(const UiActiveState &systemactivation)
@@ -420,6 +423,7 @@ void UpdateModel::setSystemActivation(const UiActiveState &systemactivation)
Q_EMIT systemActivationChanged(systemactivation);
}
@ -227,10 +246,10 @@ index 378f33d..4fcc591 100644
void UpdateModel::isUpdatablePackages(bool isUpdatablePackages)
{
diff --git a/src/frame/modules/update/updatemodel.h b/src/frame/modules/update/updatemodel.h
index b268e09..036292c 100644
index 6187b89..f4189fb 100644
--- a/src/frame/modules/update/updatemodel.h
+++ b/src/frame/modules/update/updatemodel.h
@@ -158,8 +158,10 @@ public:
@@ -164,8 +164,10 @@ public:
bool getIsRecoveryBackingup(UpdatesStatus state) const;
@ -241,7 +260,7 @@ index b268e09..036292c 100644
inline bool getUpdatablePackages() const {return m_isUpdatablePackages;}
void isUpdatablePackages(bool isUpdatablePackages);
@@ -203,7 +205,9 @@ Q_SIGNALS:
@@ -282,7 +284,9 @@ Q_SIGNALS:
void recoverConfigValidChanged(bool recoverConfigValid);
void recoverRestoringChanged(bool recoverRestoring);
void systemVersionChanged(QString version);
@ -251,7 +270,7 @@ index b268e09..036292c 100644
void beginCheckUpdate();
void updateCheckUpdateTime();
void updateHistoryAppInfos();
@@ -239,7 +243,9 @@ private:
@@ -334,7 +338,9 @@ private:
bool m_bRecoverRestoring;
QString m_systemVersionInfo;
QMetaEnum m_metaEnum;
@ -262,10 +281,10 @@ index b268e09..036292c 100644
QString m_lastCheckUpdateTime; //上次检查更新时间
QList<AppUpdateInfo> m_historyAppInfos; //历史更新应用列表
diff --git a/src/frame/modules/update/updatework.cpp b/src/frame/modules/update/updatework.cpp
index 01e9a3f..71d889d 100644
index ffda8a3..8a64560 100644
--- a/src/frame/modules/update/updatework.cpp
+++ b/src/frame/modules/update/updatework.cpp
@@ -199,6 +199,7 @@ void UpdateWorker::init() {
@@ -221,6 +221,7 @@ void UpdateWorker::init()
#endif
}
@ -273,7 +292,7 @@ index 01e9a3f..71d889d 100644
void UpdateWorker::licenseStateChangeSlot()
{
QFutureWatcher<void> *watcher = new QFutureWatcher<void>();
@@ -226,6 +227,7 @@ void UpdateWorker::getLicenseState()
@@ -248,6 +249,7 @@ void UpdateWorker::getLicenseState()
qDebug() << "Authorization State:" << reply;
m_model->setSystemActivation(reply);
}
@ -281,7 +300,7 @@ index 01e9a3f..71d889d 100644
void UpdateWorker::activate()
{
@@ -260,11 +262,13 @@ void UpdateWorker::activate()
@@ -300,11 +302,13 @@ void UpdateWorker::activate()
refreshMirrors();
#endif
@ -293,13 +312,13 @@ index 01e9a3f..71d889d 100644
this, SLOT(licenseStateChangeSlot()));
+#endif
QFutureWatcher<QStringList> *packagesWatcher = new QFutureWatcher<QStringList>();
connect(packagesWatcher, &QFutureWatcher<QStringList>::finished, this, [=] {
QFutureWatcher<QMap<QString, QStringList>> *packagesWatcher = new QFutureWatcher<QMap<QString, QStringList>>();
connect(packagesWatcher, &QFutureWatcher<QStringList>::finished, this, [ = ] {
diff --git a/src/frame/modules/update/updatework.h b/src/frame/modules/update/updatework.h
index 66cfbdb..4e4a65a 100644
index 7610383..a34ef72 100644
--- a/src/frame/modules/update/updatework.h
+++ b/src/frame/modules/update/updatework.h
@@ -72,7 +72,9 @@ public:
@@ -85,7 +85,9 @@ public:
void setOnBattery(bool onBattery);
void setBatteryPercentage(const BatteryPercentageInfo &info);
void setSystemBatteryPercentage(const double &value);
@ -307,12 +326,12 @@ index 66cfbdb..4e4a65a 100644
void getLicenseState();
+#endif
Q_SIGNALS:
void requestInit();
@@ -107,7 +109,9 @@ public Q_SLOTS:
void recoveryCanBackup();
void setSysUpdateDownloadJobName(const QString &sysUpdateDownloadJobName);
void setSafeUpdateDownloadJobName(const QString &safeUpdateDownloadJobName);
@@ -127,7 +129,9 @@ public Q_SLOTS:
void recoveryStartRestore();
void onNotifyDownloadInfoChanged();
void onRecoveryBackupFinshed(const QString &kind, const bool success, const QString &errMsg);
+#ifndef DISABLE_ACTIVATOR
void licenseStateChangeSlot();
+#endif
@ -320,10 +339,10 @@ index 66cfbdb..4e4a65a 100644
void refreshLastTimeAndCheckCircle();
void setUpdateNotify(const bool notify);
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
index 184b2be..d7db8d6 100644
index 3ba9b1f..02fc1ca 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
@@ -92,7 +92,9 @@ NativeInfoWidget::NativeInfoWidget(SystemInfoModel *model, QWidget *parent)
@@ -84,7 +84,9 @@ NativeInfoWidget::NativeInfoWidget(SystemInfoModel *model, QWidget *parent)
NativeInfoWidget::~NativeInfoWidget()
{
@ -333,24 +352,24 @@ index 184b2be..d7db8d6 100644
GSettingWatcher::instance()->erase("systeminfoNativeinfoKernel", m_kernel);
GSettingWatcher::instance()->erase("systeminfoNativeinfoProcessor", m_processor);
GSettingWatcher::instance()->erase("systeminfoNativeinfoMemory", m_memory);
@@ -202,6 +204,7 @@ void NativeInfoWidget::initWidget()
@@ -195,6 +197,7 @@ void NativeInfoWidget::initWidget()
//~ child_page About This PC
m_type->setTitle(tr("Type:"));
m_type->setTitle(tr("Type") + ':');
+#ifndef DISABLE_ACTIVATOR
m_authorized = new TitleAuthorizedItem(frame);
//~ contents_path /systeminfo/About This PC
//~ child_page About This PC
@@ -214,6 +217,7 @@ void NativeInfoWidget::initWidget()
} else {
@@ -208,6 +211,7 @@ void NativeInfoWidget::initWidget()
m_authorized->setVisable(true);
}
}*/
m_authorized->setVisable(true);
+#endif
m_kernel = new TitleValueItem(frame);
//~ contents_path /systeminfo/About This PC
@@ -233,7 +237,9 @@ void NativeInfoWidget::initWidget()
m_memory->setTitle(tr("Memory:"));
@@ -227,7 +231,9 @@ void NativeInfoWidget::initWidget()
m_memory->setTitle(tr("Memory") + ':');
m_memory->setValue(m_model->memory());
+#ifndef DISABLE_ACTIVATOR
@ -359,7 +378,7 @@ index 184b2be..d7db8d6 100644
GSettingWatcher::instance()->bind("systeminfoNativeinfoKernel", m_kernel);
GSettingWatcher::instance()->bind("systeminfoNativeinfoProcessor", m_processor);
GSettingWatcher::instance()->bind("systeminfoNativeinfoMemory", m_memory);
@@ -246,9 +252,11 @@ void NativeInfoWidget::initWidget()
@@ -240,9 +246,11 @@ void NativeInfoWidget::initWidget()
}
infoGroup->appendItem(m_version, SettingsGroup::ItemBackground);
infoGroup->appendItem(m_type);
@ -371,7 +390,7 @@ index 184b2be..d7db8d6 100644
infoGroup->appendItem(m_kernel);
infoGroup->appendItem(m_processor);
infoGroup->appendItem(m_memory);
@@ -279,13 +287,17 @@ void NativeInfoWidget::initWidget()
@@ -273,13 +281,17 @@ void NativeInfoWidget::initWidget()
connect(m_model, &SystemInfoModel::processorChanged, this, &NativeInfoWidget::setProcessor);
connect(m_model, &SystemInfoModel::memoryChanged, this, &NativeInfoWidget::setMemory);
@ -389,7 +408,7 @@ index 184b2be..d7db8d6 100644
}
void NativeInfoWidget::resizeEvent(QResizeEvent *event)
@@ -328,6 +340,7 @@ void NativeInfoWidget::setMemory(const QString &memory)
@@ -335,6 +347,7 @@ void NativeInfoWidget::setMemory(const QString &memory)
m_memory->setValue(memory);
}
@ -397,8 +416,8 @@ index 184b2be..d7db8d6 100644
void NativeInfoWidget::setLicenseState(ActiveState state)
{
if (state == Authorized) {
@@ -352,6 +365,7 @@ void NativeInfoWidget::setLicenseState(ActiveState state)
m_authorized->setButtonText(tr("Activate"));
@@ -363,6 +376,7 @@ void NativeInfoWidget::setLicenseState(ActiveState state)
m_authorized->setButtonText(tr("View"));
}
}
+#endif
@ -406,10 +425,10 @@ index 184b2be..d7db8d6 100644
const QString NativeInfoWidget::systemCopyright() const
{
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.h b/src/frame/window/modules/systeminfo/nativeinfowidget.h
index 1849793..93e24ef 100644
index 8dea9d7..699c2f4 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.h
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.h
@@ -79,7 +79,9 @@ public Q_SLOTS:
@@ -63,7 +63,9 @@ public Q_SLOTS:
void setType(const QString &type);
void setProcessor(const QString &processor);
void setMemory(const QString &memory);
@ -419,7 +438,7 @@ index 1849793..93e24ef 100644
void onToolButtonButtonClicked();
void onFocusChanged(const bool onFocus);
@@ -90,7 +92,9 @@ public Q_SLOTS:
@@ -74,7 +76,9 @@ public Q_SLOTS:
void onSetHostNameError(const QString &error);
Q_SIGNALS:
@ -429,7 +448,7 @@ index 1849793..93e24ef 100644
protected:
void resizeEvent(QResizeEvent *event) override;
@@ -108,7 +112,9 @@ private:
@@ -92,7 +96,9 @@ private:
dcc::widgets::TitleValueItem *m_versionNumber;
dcc::widgets::TitleValueItem *m_version;
dcc::widgets::TitleValueItem *m_type;
@ -440,10 +459,10 @@ index 1849793..93e24ef 100644
dcc::widgets::TitleValueItem *m_processor;
dcc::widgets::TitleValueItem *m_memory;
diff --git a/src/frame/window/modules/systeminfo/systeminfomodule.cpp b/src/frame/window/modules/systeminfo/systeminfomodule.cpp
index 05fac20..563a3ee 100644
index ba7444a..3d4a4d4 100644
--- a/src/frame/window/modules/systeminfo/systeminfomodule.cpp
+++ b/src/frame/window/modules/systeminfo/systeminfomodule.cpp
@@ -129,7 +129,9 @@ void SystemInfoModule::onShowAboutNativePage()
@@ -254,7 +254,9 @@ void SystemInfoModule::onShowAboutNativePage()
m_frameProxy->pushWidget(this, w);
w->setVisible(true);
//showActivatorDialog
@ -454,24 +473,24 @@ index 05fac20..563a3ee 100644
void SystemInfoModule::onVersionProtocolPage()
diff --git a/src/frame/window/modules/update/updatectrlwidget.cpp b/src/frame/window/modules/update/updatectrlwidget.cpp
index 158d6c4..415e89c 100644
index 6285d73..db26368 100644
--- a/src/frame/window/modules/update/updatectrlwidget.cpp
+++ b/src/frame/window/modules/update/updatectrlwidget.cpp
@@ -63,9 +63,13 @@ UpdateCtrlWidget::UpdateCtrlWidget(UpdateModel *model, QWidget *parent)
@@ -51,9 +51,13 @@ UpdateCtrlWidget::UpdateCtrlWidget(UpdateModel *model, QWidget *parent)
, m_bRecoverBackingUp(false)
, m_bRecoverConfigValid(false)
, m_bRecoverRestoring(false)
+#ifndef DISABLE_ACTIVATOR
, m_activeState(UiActiveState::Unknown)
+#endif
, m_updateList(new ContentWidget)
, m_updateList(new ContentWidget(parent))
+#ifndef DISABLE_ACTIVATOR
, m_authorizationPrompt(new TipsLabel)
, m_authorizationPrompt(new TipsLabel(parent))
+#endif
, m_checkUpdateBtn(new QPushButton)
, m_lastCheckTimeTip(new TipsLabel)
{
@@ -85,11 +89,15 @@ UpdateCtrlWidget::UpdateCtrlWidget(UpdateModel *model, QWidget *parent)
, m_isUpdateingAll(false)
, m_checkUpdateBtn(new QPushButton(parent))
, m_lastCheckTimeTip(new TipsLabel(parent))
@@ -94,11 +98,15 @@ UpdateCtrlWidget::UpdateCtrlWidget(UpdateModel *model, QWidget *parent)
m_fullProcess->setVisible(false);
m_fullProcess->setProcessValue(100);
@ -485,9 +504,9 @@ index 158d6c4..415e89c 100644
fullProcesslayout->addWidget(m_authorizationPrompt);
+#endif
m_summaryGroup->setVisible(true);
@@ -172,7 +180,9 @@ void UpdateCtrlWidget::setShowInfo(const UiActiveState value)
m_powerTip->setWordWrap(true);
m_powerTip->setAlignment(Qt::AlignHCenter);
@@ -290,7 +298,9 @@ void UpdateCtrlWidget::setShowInfo(const UiActiveState value)
}
m_fullProcess->setEnabled(activation);
@ -496,11 +515,11 @@ index 158d6c4..415e89c 100644
+#endif
}
void UpdateCtrlWidget::loadAppList(const QList<AppUpdateInfo> &infos)
@@ -253,9 +263,11 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
{
void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
@@ -298,9 +308,11 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
m_status = status;
qDebug() << "UpdateCtrlWidget::setStatus " << status;
+#ifndef DISABLE_ACTIVATOR
if (m_model->systemActivation() == UiActiveState::Unauthorized || m_model->systemActivation() == UiActiveState::TrialExpired) {
m_status = NoAtive;
@ -509,7 +528,7 @@ index 158d6c4..415e89c 100644
Q_EMIT notifyUpdateState(m_status);
@@ -264,7 +276,9 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
@@ -309,7 +321,9 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
m_resultItem->setVisible(false);
m_progress->setVisible(false);
m_fullProcess->setVisible(false);
@ -519,19 +538,9 @@ index 158d6c4..415e89c 100644
m_updateList->setVisible(false);
m_upgradeWarningGroup->setVisible(false);
m_reminderTip->setVisible(false);
@@ -312,7 +326,9 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
//~ child_page Updates
m_fullProcess->setMessage(tr("Download and install updates"));
setDownloadInfo(m_model->downloadInfo());
+#ifndef DISABLE_ACTIVATOR
setShowInfo(m_model->systemActivation());
+#endif
setLowBattery(m_model->lowBattery());
break;
case UpdatesStatus::Downloading:
@@ -457,10 +473,12 @@ void UpdateCtrlWidget::setLowBattery(const bool &lowBattery)
@@ -430,10 +444,12 @@ void UpdateCtrlWidget::setLowBattery(const bool &lowBattery)
{
if (m_status == UpdatesStatus::Downloaded || m_status == UpdatesStatus::UpdatesAvailable) {
if (m_status == UpdatesStatus::Updateing || m_status == UpdatesStatus::UpdatesAvailable) {
bool activation = false;
+#ifndef DISABLE_ACTIVATOR
const UiActiveState value = m_model->systemActivation();
@ -542,7 +551,7 @@ index 158d6c4..415e89c 100644
if (lowBattery) {
m_powerTip->setText(tr("Your battery is lower than 50%, please plug in to continue"));
} else {
@@ -502,6 +520,7 @@ void UpdateCtrlWidget::setRecoverRestoring(const bool value)
@@ -481,6 +497,7 @@ void UpdateCtrlWidget::setRecoverRestoring(const bool value)
}
}
@ -550,39 +559,40 @@ index 158d6c4..415e89c 100644
void UpdateCtrlWidget::setActiveState(const UiActiveState &activestate)
{
if (m_activeState != activestate) {
@@ -515,6 +534,7 @@ void UpdateCtrlWidget::setActiveState(const UiActiveState &activestate)
@@ -493,7 +510,7 @@ void UpdateCtrlWidget::setActiveState(const UiActiveState &activestate)
setStatus(m_model->status());
}
}
-
+#endif
void UpdateCtrlWidget::setModel(UpdateModel *model)
{
@@ -528,7 +548,9 @@ void UpdateCtrlWidget::setModel(UpdateModel *model)
@@ -514,7 +531,9 @@ void UpdateCtrlWidget::setModel(UpdateModel *model)
connect(m_model, &UpdateModel::recoverBackingUpChanged, this, &UpdateCtrlWidget::setRecoverBackingUp);
connect(m_model, &UpdateModel::recoverConfigValidChanged, this, &UpdateCtrlWidget::setRecoverConfigValid);
connect(m_model, &UpdateModel::recoverRestoringChanged, this, &UpdateCtrlWidget::setRecoverRestoring);
+#ifndef DISABLE_ACTIVATOR
connect(m_model, &UpdateModel::systemActivationChanged, this, &UpdateCtrlWidget::setActiveState);
+#endif
connect(m_model, &UpdateModel::classityUpdateJobErrorChanged, this, &UpdateCtrlWidget::onClassityUpdateJonErrorChanged);
setUpdateProgress(m_model->updateProgress());
connect(m_model, &UpdateModel::systemUpdateInfoChanged, this, &UpdateCtrlWidget::setSystemUpdateInfo);
diff --git a/src/frame/window/modules/update/updatectrlwidget.h b/src/frame/window/modules/update/updatectrlwidget.h
index f54ee46..0e219f9 100644
index 99713c2..a4a9cb1 100644
--- a/src/frame/window/modules/update/updatectrlwidget.h
+++ b/src/frame/window/modules/update/updatectrlwidget.h
@@ -86,7 +86,9 @@ private:
@@ -103,7 +103,9 @@ private:
void setRecoverConfigValid(const bool value);
void setRecoverRestoring(const bool value);
void setShowInfo(const UiActiveState value);
+#ifndef DISABLE_ACTIVATOR
void setActiveState(const UiActiveState &activestate);
+#endif
void showUpdateInfo();
private:
dcc::update::UpdateModel *m_model;
@@ -107,9 +109,13 @@ private:
void onChangeUpdatesAvailableStatus();
@@ -135,9 +137,13 @@ private:
bool m_bRecoverBackingUp;
bool m_bRecoverConfigValid;
bool m_bRecoverRestoring;
@ -593,14 +603,14 @@ index f54ee46..0e219f9 100644
+#ifndef DISABLE_ACTIVATOR
dcc::widgets::TipsLabel *m_authorizationPrompt;
+#endif
bool m_isUpdateingAll;
QPushButton *m_checkUpdateBtn;
dcc::widgets::TipsLabel *m_lastCheckTimeTip;
diff --git a/src/frame/window/modules/update/updatemodule.cpp b/src/frame/window/modules/update/updatemodule.cpp
index ef5529b..e84f643 100644
index 2de16ba..9bf5b9a 100644
--- a/src/frame/window/modules/update/updatemodule.cpp
+++ b/src/frame/window/modules/update/updatemodule.cpp
@@ -77,7 +77,9 @@ void UpdateModule::preInitialize(bool sync, FrameProxyInterface::PushType pushty
@@ -61,7 +61,9 @@ void UpdateModule::preInitialize(bool sync, FrameProxyInterface::PushType pushty
connect(m_work.get(), &UpdateWorker::requestInit, m_work.get(), &UpdateWorker::init);
connect(m_work.get(), &UpdateWorker::requestActive, m_work.get(), &UpdateWorker::activate);
@ -610,19 +620,7 @@ index ef5529b..e84f643 100644
#ifndef DISABLE_SYS_UPDATE_MIRRORS
connect(m_work.get(), &UpdateWorker::requestRefreshMirrors, m_work.get(), &UpdateWorker::refreshMirrors);
@@ -150,9 +152,11 @@ void UpdateModule::active()
Q_EMIT m_work->requestRefreshLicenseState();
+#ifndef DISABLE_ACTIVATOR
if (m_model->systemActivation() == UiActiveState::Authorized || m_model->systemActivation() == UiActiveState::TrialAuthorized || m_model->systemActivation() == UiActiveState::AuthorizedLapse) {
m_updateWidget->setSystemVersion(m_model->systemVersionInfo());
}
+#endif
m_updateWidget->setModel(m_model, m_work.get());
connect(m_updateWidget, &UpdateWidget::pushMirrorsView, this, [=]() {
@@ -186,7 +190,7 @@ void UpdateModule::active()
@@ -176,7 +178,7 @@ void UpdateModule::active()
m_updateWidget->setSystemVersion(m_model->systemVersionInfo());
}
#else

View File

@ -1,56 +0,0 @@
# dde-control-center
#### Description
dde control center:The DDE desktop operating system uses the control center to manage basic system Settings, including account management, network Settings, date and time, personalized Settings, display Settings, and system information viewing. When you enter the desktop environment, click ![controlcenter](https://docs.openeuler.org/zh/docs/21.03/docs/desktop/figures/icon58-o.svg) on the taskbar to open the Control Center window
#### Software Architecture
Software architecture description
#### Installation
1. dnf install dde-control-center
#### Instructions
. The home page of the control center mainly displays each setting module, which is convenient for daily viewing and quick setting.
2. After opening a setting module in the control center, you can switch to another setting module in the navigation bar on the left.
3. Account module: You can add and modify system accounts.
4. Display module: set the resolution, brightness, screen direction of the display, so that your computer display to the best state.
5. Default program module: When multiple applications with similar functions are installed, one of them can be selected as the default startup program for the corresponding file type.
6. Personalized module: can set the system theme, activity color, font, etc., change the appearance of the desktop and window, set into your favorite display style.
7. Network setting module: After logging in to the system, you need to connect to the network to receive mail, browse news, download files, chat, online shopping, etc.
8. Sound module: input and output device sound Settings (such as setting loudspeaker and microphone), so that you can listen more comfortable, more clear recording.
9. Date and time: Select your time zone correctly to display the correct date and time. You can also manually change the time and date.
10. Power management: Set the system power supply to make the system safer.
11. Mouse: The mouse is a common input device for computers. Use the mouse, you can make the operation more simple and quick.
12. Keyboard language: In this module, you can set the keyboard properties to suit your typing habits, adjust the keyboard layout according to the country and language, set the system language, and customize the shortcut keys.
13. System information: You can view the system version, version authorization, computer hardware and other information, as well as some protocols of the system.
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,45 +0,0 @@
# dde-control-center
#### 介绍
dde control center:DDE桌面操作系统通过控制中心来管理系统的基本设置包括帐户管理、网络设置、日期和时间、个性化设置、显示设置、系统信息查看等。当您进入桌面环境后单击任务栏上的 ![controlcenter](https://docs.openeuler.org/zh/docs/21.03/docs/desktop/figures/icon58-o.svg) 即可打开控制中心窗口
#### 软件架构
软件架构说明
#### 安装教程
1. dnf install dde-control-center
#### 使用说明
1. 控制中心首页主要展示各个设置模块,方便日常查看和快速设置。
2. 打开控制中心的某一设置模块后,可以通过左侧导航栏快速切换到另一设置模块。
3. 账户模块:可以进行系统账户的新增修改。
4. 显示模块:设置显示器的分辨率、亮度、屏幕方向等,让您的电脑显示到达最佳状态。
5. 默认程序模块:当安装有多个功能相似的应用程序时,可以选择其中的一个应用作为对应文件类型的默认启动程序。
6. 个性化模块:可以设置系统主题、活动用色、字体等,改变桌面和窗口的外观,设置成您喜欢的显示风格。
7. 网络设置模块:登录系统后,您需要连接网络,才能接收邮件、浏览新闻、下载文件、聊天、网上购物等。
8. 声音模块:输入输出设备声音的设置(如设置扬声器和麦克风),让您听得更舒适,录音更清晰。
9. 时间日期:正确选择您所在的时区,一般即可显示正确的日期和时间。您也可以手动修改时间和日期。
10. 电源管理:对系统电源进行一些设置,让系统更安全。
11. 鼠标:鼠标是计算机的常用输入设备。使用鼠标,可以使操作更加简便快捷。
12. 键盘语言:在此模块,您可以设置键盘属性,以便符合您的输入习惯,还可以根据国家和语言调整键盘布局,设置系统语言,以及自定义快捷键。
13. 系统信息:您可以查看系统版本、版本授权和电脑硬件等信息,以及该系统的一些协议。
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 码云特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

Binary file not shown.

Binary file not shown.

View File

@ -1,27 +1,48 @@
%define specrelease 3%{?dist}
%if 0%{?openeuler}
%define specrelease 3
%endif
Name: dde-control-center
Version: 5.4.85.4
Release: %{specrelease}
Version: 5.5.182
Release: 5
Summary: New control center for Linux Deepin
License: GPLv3
URL: https://github.com/linuxdeepin/%{name}
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: 0002-hide-authorized.patch
Patch1: 0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch
Patch2: 0003-bugfix-for-no-check-newpassword-at-modifypwd.patch
Patch3: 0004-fix.patch
Patch4: 0005-fix-hide-commoninfo-and-end-user-license-agreement.patch
URL: https://github.com/linuxdeepin/dde-coptrol-center
Source0: %{name}-%{version}.tar.gz
#add by uos
Patch0001: 0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch
# activate butten
Patch0003: 0003-dde-control-center-uos-open-activate-button-for-1050.patch
# disable windowmoveswitch
Patch0004: 0004-dde-control-center-disable-windowmoveswitch.patch
# add setVersion
Patch0005: 0005-dde-control-center-feat-add-setVersion.patch
# uelc hide commoninfo
Patch0006: 0006-hide-commonifo-and-end-user-license-agreement.patch
# add Free-license
Patch0007: 0007-dde-control-center-uos-add-Free-license.patch
# hidden power-press-powerbtn
Patch0008: 0008-dde-control-center-feat-hidden-power-press-powerbtn.patch
# modify copyright read current year
Patch0009: 0009-dde-control-center-feat-modify-copyright-read-current-year.patch
Patch0010: 0001-feat-root.patch
# pms 204145
Patch0011: 0010-fix-Array-out-of-bounds-causes-crash-handling.patch
# hide activate
Patch0012: 0011-hide-activate-function.patch
#end
#Patch0: 0002-hide-authorized.patch
#Patch1: 0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch
#Patch2: 0003-bugfix-for-no-check-newpassword-at-modifypwd.patch
#Patch3: 0004-fix.patch
#Patch4: 0005-fix-hide-commoninfo-and-end-user-license-agreement.patch
BuildRequires: gcc-c++
BuildRequires: desktop-file-utils
BuildRequires: dde-dock-devel
BuildRequires: pkgconfig(dde-network-utils)
#BuildRequires: dde-network-core-devel
BuildRequires: dde-network-utils-devel
BuildRequires: dtkwidget-devel
BuildRequires: dtkgui-devel dtkcore-devel
BuildRequires: dtkgui-devel
BuildRequires: dtkcore-devel
BuildRequires: dde-qt-dbus-factory-devel
BuildRequires: pkgconfig(gsettings-qt)
BuildRequires: pkgconfig(geoip)
@ -40,14 +61,26 @@ BuildRequires: gmock-devel
BuildRequires: polkit-qt5-1-devel
BuildRequires: deepin-pw-check
BuildRequires: deepin-pw-check-devel
BuildRequires: pkgconfig(wayland-client)
BuildRequires: kf5-kwayland-devel
BuildRequires: qt5-qtbase-static
BuildRequires: libxkbcommon-devel
BuildRequires: pkgconfig(wayland-client)
BuildRequires: kf5-kwayland-devel
BuildRequires: qt5-qtbase-static
BuildRequires: libxkbcommon-devel
BuildRequires: dareader-devel
BuildRequires: qt5-qtbase-private-devel
Requires: dde-account-faces
Requires: dde-api
Requires: dde-daemon
Requires: dde-qt5integration
#Requires: dde-network-core
Requires: dde-network-utils
Requires: startdde
Requires: dde-server-industry-config
#Requires: deepin-pw-check
Requires: deepin-pw-check
Requires: cracklib
Recommends: NetworkManager-l2tp
@ -62,18 +95,30 @@ Summary: %{summary}
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch0001 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%patch0009 -p1
%patch0010 -p1
%patch0011 -p1
%patch0012 -p1
sed -i 's|lrelease|lrelease-qt5|' translate_generation.sh
sed -i -E '/add_compile_definitions/d' CMakeLists.txt
%build
%cmake . -DDCC_DISABLE_GRUB=YES \
-DDISABLE_AUTHENTICATION=YES \
-DDISABLE_ACCOUNT=YES \
-DDISABLE_SYS_UPDATE=YES \
-DDISABLE_ACTIVATOR=YES
-DDISABLE_SYS_UPDATE_SOURCE_CHECK=YES \
-DDISABLE_SYS_UPDATE_MIRRORS=YES \
-DDISABLE_ACTIVATOR=YES \
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir}
%make_build
%post
@ -91,8 +136,8 @@ mkdir -p %{buildroot}%{_libdir}/%{name}/plugins
# https://github.com/linuxdeepin/dde-control-center/issues/115
# And we disabled SYS_UPDATE, so reboot-reminder-dialog is useless.
#rm %{buildroot}%{_bindir}/reboot-reminder-dialog
mkdir -p %{buildroot}/usr/lib64/cmake/DdeControlCenter
mv %{buildroot}/cmake/DdeControlCenter/DdeControlCenterConfig.cmake %{buildroot}/usr/lib64/cmake/DdeControlCenter
#mkdir -p %{buildroot}/usr/lib64/cmake/DdeControlCenter
#mv %{buildroot}/cmake/DdeControlCenter/DdeControlCenterConfig.cmake %{buildroot}/usr/lib64/cmake/DdeControlCenter
mv %{buildroot}/usr/lib/libdccwidgets.so %{buildroot}%{_libdir}/
install -Dm644 com.deepin.controlcenter.addomain.policy %{buildroot}%{_datadir}/polkit-1/actions/
@ -104,19 +149,34 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop ||:
%files
%doc README.md
%license LICENSE
%{_sysconfdir}/
%{_bindir}/abrecovery
%{_bindir}/dde-control-center
%{_bindir}/dde-control-center-wapper
%{_datadir}/
%{_libdir}/libdccwidgets.so
#/etc/xdg/autostart/deepin-ab-recovery.desktop
%{_sysconfdir}/xdg/autostart/deepin-ab-recovery.desktop
%{_prefix}/lib/dde-grand-search-daemon/
%files devel
%{_includedir}/dde-control-center
%{_libdir}/cmake/DdeControlCenter/
%changelog
* Wed Sep 06 2023 leeffo <liweiganga@uniontech.com> - 5.5.182-5
- disable activate button
* Tue Aug 29 2023 yangxianzhao <yangxianzhao@uniontech.com> - 5.5.182-4
- Update BR
* Tue Aug 29 2023 yangxianzhao <yangxianzhao@uniontech.com> - 5.5.182-3
- Modify BR for build on qt5-qtbase-5.15.10
* Fri Aug 18 2023 leeffo <liweiganga@uniontech.com> - 5.5.182-2
- update BR
* Wed Aug 02 2023 leeffo <liweiganga@uniontech.com> - 5.5.182-1
- upgrade to version 5.5.182
* Thu Jun 08 2023 lee <liweiganga@uniontech.com> - 5.4.85.4-3
- fix: control-center core and hide commoninfo