9 Star 6 Fork 27

src-openEuler/dde-control-center

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0007-dde-control-center-uos-add-Free-license.patch 5.29 KB
一键复制 编辑 原始数据 按行查看 历史
Venland 提交于 2023-08-02 10:43 +08:00 . upgrade to version 5.5.182
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/dde-control-center.git
git@gitee.com:src-openeuler/dde-control-center.git
src-openeuler
dde-control-center
dde-control-center
openEuler-24.09

搜索帮助