From 8b0b67f2f01248ed8b4e6ca60d5125001f6dc019 Mon Sep 17 00:00:00 2001 From: peijiankang Date: Fri, 15 Sep 2023 14:17:08 +0800 Subject: [PATCH] add add-information-for-about.patch --- add-information-for-about.patch | 490 ++++++++++++++++++++++++++++++++ ukui-control-center.spec | 9 +- 2 files changed, 498 insertions(+), 1 deletion(-) create mode 100644 add-information-for-about.patch diff --git a/add-information-for-about.patch b/add-information-for-about.patch new file mode 100644 index 0000000..a91a86a --- /dev/null +++ b/add-information-for-about.patch @@ -0,0 +1,490 @@ +From 9c4097314c5e50eca8042ec8b846a0eb53e1f171 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Wed, 21 Jun 2023 16:59:26 +0800 +Subject: [PATCH] add information for about + +--- + plugins/system/about/about.cpp | 115 +++++++++++++++++++++++-------- + plugins/system/about/about.h | 2 + + shell/res/i18n/zh_CN.ts | 122 +++++++++++++++++++++------------ + 3 files changed, 165 insertions(+), 74 deletions(-) + +diff --git a/plugins/system/about/about.cpp b/plugins/system/about/about.cpp +index 3d474fa..4d6af71 100644 +--- a/plugins/system/about/about.cpp ++++ b/plugins/system/about/about.cpp +@@ -470,6 +470,15 @@ void About::initUI(QWidget *widget) + QString currentyear("2023"); + mTipLabel = new FixLabel(QString(tr("Copyright © 2009-%1 KylinSoft. All rights reserved.")).arg(currentyear) , Aboutwidget); + mTipLabel->setContentsMargins(16 , 0 , 0 , 0); ++ ++ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//kylin ++ mKindLabel = new FixLabel(QString(tr("Kind reminder: If you have any questions, please consult sales\n" ++ "Consultation hotline: 400-089-1870")), Aboutwidget); ++ mKindLabel->setContentsMargins(16 , 0 , 0 , 0); ++ ++ mWebLabel = new FixLabel(QString(tr("Company website: https://www.kylinos.cn")), Aboutwidget); ++ mWebLabel->setContentsMargins(16 , 0 , 0 , 0); ++ } + + mBtnFrame = new QFrame(Aboutwidget); + mBtnFrame->setMinimumSize(QSize(550, 0)); +@@ -543,7 +552,13 @@ void About::initUI(QWidget *widget) + + AboutLayout->addWidget(mInformationFrame); + AboutLayout->addWidget(mActivationFrame); +- AboutLayout->addWidget(mTipLabel); ++ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//kylin ++ AboutLayout->addWidget(mKindLabel); ++ AboutLayout->addWidget(mTipLabel); ++ AboutLayout->addWidget(mWebLabel); ++ }else{ ++ AboutLayout->addWidget(mTipLabel); ++ } + item = new QSpacerItem(10 , 32); + AboutLayout->addSpacerItem(item); + // AboutLayout->addSpacing(32); +@@ -683,36 +698,74 @@ void About::setupSerialComponent() + if (trial_dateReply.type() == QDBusMessage::ReplyMessage) { + trial_dateRes = trial_dateReply.arguments().at(0).toString(); + } +- mSequenceLabel_2->setText(serial); +- mSequenceLabel_2->setStyleSheet("color : #2FB3E8"); +- if(Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){ ++ if(Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//社区 ++ mSequenceLabel_2->setText(serial); ++ mSequenceLabel_2->setStyleSheet("color : #2FB3E8"); + if (serial.isEmpty()) + mActivationBtn->hide(); +- } +- if (status == 0) { //未激活 激活或未激活应通过status判断 +- if (!trial_dateRes.isEmpty()) { //试用期 +- mStatusLabel_2->setText(tr("Inactivated")); +- mStatusLabel_2->setStyleSheet("color : red "); +- mTimeLabel_1->setText(tr("Trial expiration time")); +- mTimeLabel_2->setText(trial_dateRes); +- mActivationBtn->setText(tr("Active")); +- activestatus = false; +- } else { +- mTimeLabel_1->hide(); +- mTimeLabel_2->hide(); +- mStatusLabel_2->setText(tr("Inactivated")); +- mStatusLabel_2->setStyleSheet("color : red "); +- mActivationBtn->setText(tr("Active")); +- } +- } else { //已激活 +- mActivationBtn->hide(); +- mTrialLabel->hide(); +- mAndLabel->hide(); +- mStatusLabel_2->setStyleSheet(""); +- mStatusLabel_2->setText(tr("Activated")); +- mTimeLabel_2->setText(dateRes); +- mActivationBtn->setText(tr("Extend")); +- mActivationBtn->show(); ++ if (status == 0) { //未激活 激活或未激活应通过status判断 ++ if (!trial_dateRes.isEmpty()) { //试用期 ++ mStatusLabel_2->setText(tr("Inactivated")); ++ mStatusLabel_2->setStyleSheet("color : red "); ++ mTimeLabel_1->setText(tr("Trial expiration time")); ++ mTimeLabel_2->setText(trial_dateRes); ++ mActivationBtn->setText(tr("Active")); ++ activestatus = false; ++ } else { ++ mTimeLabel_1->hide(); ++ mTimeLabel_2->hide(); ++ mStatusLabel_2->setText(tr("Inactivated")); ++ mStatusLabel_2->setStyleSheet("color : red "); ++ mActivationBtn->setText(tr("Active")); ++ } ++ } else { //已激活 ++ mActivationBtn->hide(); ++ mTrialLabel->hide(); ++ mAndLabel->hide(); ++ mStatusLabel_2->setStyleSheet(""); ++ mStatusLabel_2->setText(tr("Activated")); ++ mTimeLabel_2->setText(dateRes); ++ mActivationBtn->setText(tr("Extend")); ++ mActivationBtn->show(); ++ } ++ }else{//kylin ++ if (status == 0) { //未激活 激活或未激活应通过status判断 ++ if (!trial_dateRes.isEmpty()) { //试用期 ++ mStatusLabel_2->setText(tr("Inactivated")); ++ mStatusLabel_2->setStyleSheet("color : red "); ++ mTimeLabel_1->setText(tr("Trial expiration time")); ++ mTimeLabel_2->setText(trial_dateRes); ++ mActivationBtn->setText(tr("Active")); ++ activestatus = false; ++ } else { ++ mStatusLabel_2->setText(tr("Inactivated")); ++ mStatusLabel_2->setStyleSheet("color : red "); ++ mTimeLabel_1->setText(tr("Trial expiration time")); ++ mTimeLabel_2->setText(tr("Unknow")); ++ mActivationBtn->setText(tr("Active")); ++ } ++ } else { //已激活 ++ mActivationBtn->hide(); ++ mTrialLabel->hide(); ++ mAndLabel->hide(); ++ mStatusLabel_2->setStyleSheet(""); ++ mStatusLabel_2->setText(tr("Activated")); ++ mTimeLabel_1->setText(tr("Service expiration time")); ++ mTimeLabel_2->setText(dateRes); ++ mActivationBtn->setText(tr("Extend")); ++ mActivationBtn->show(); ++ } ++ if (serial.isEmpty()){ ++ mTimeLabel_1->hide(); ++ mTimeLabel_2->hide(); ++ mSequenceLabel_2->setText(tr("Unknow")); ++ mSequenceLabel_2->setStyleSheet("color : #2FB3E8"); ++ }else{ ++ mTimeLabel_1->show(); ++ mTimeLabel_2->show(); ++ mSequenceLabel_2->setText(serial); ++ mSequenceLabel_2->setStyleSheet("color : #2FB3E8"); ++ } + } + connect(mActivationBtn, &QPushButton::clicked, this, &About::runActiveWindow); + } +@@ -995,6 +1048,10 @@ void About::setupSystemVersion() + mAgreeLabel->hide(); + mActivationFrame->hide(); + mTipLabel->hide(); ++ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//kylin ++ mKindLabel->hide(); ++ mWebLabel->hide(); ++ } + mTrialLabel->hide(); + } + +diff --git a/plugins/system/about/about.h b/plugins/system/about/about.h +index c2571ac..c2d44a3 100644 +--- a/plugins/system/about/about.h ++++ b/plugins/system/about/about.h +@@ -169,7 +169,9 @@ private: + QLabel *mHpLabel; + FixLabel *mEducateIconLabel; + QLabel *mEducateLabel; ++ FixLabel *mKindLabel; + FixLabel *mTipLabel; ++ FixLabel *mWebLabel; + + + +diff --git a/shell/res/i18n/zh_CN.ts b/shell/res/i18n/zh_CN.ts +index db8f2f2..8d6b862 100644 +--- a/shell/res/i18n/zh_CN.ts ++++ b/shell/res/i18n/zh_CN.ts +@@ -4,94 +4,106 @@ + + About + +- ++ + System Summary + 系统概述 + + +- ++ + Support + 支持 + + +- +- ++ ++ + Version Number + 版本号 + + +- ++ + Status + 系统状态 + /About/Status + + +- ++ + DateRes + 服务到期时间 + + +- ++ + Wechat code scanning obtains HP professional technical support + 微信扫码获得HP专业技术支持 + + +- ++ + HostName + 计算机名 + + +- ++ + See more about Kylin Tianqi edu platform + 查看麒麟天启教育平台更多信息 + + +- ++ + <<Protocol>> + 《试用免责协议》 + + +- ++ + InterVersion + 内部版本 + + +- ++ + Privacy and agreement + 隐私和协议 + + +- ++ + Send optional diagnostic data + 发送可选诊断数据 + + +- ++ + By sending us diagnostic data, improve the system experience and solve your problems faster + 通过向我们发送诊断数据,提升系统体验以及更快的解决你的问题 + + +- ++ ++ Kind reminder: If you have any questions, please consult sales ++Consultation hotline: 400-089-1870 ++ 温馨提示:如有问题请咨询销售 ++咨询电话:400-089-1870 ++ ++ ++ + Copyright © 2009-%1 KylinSoft. All rights reserved. + 版权所有 © 2009-%1 麒麟软件 保留所有权利。 + + +- ++ ++ Company website: https://www.kylinos.cn ++ 公司网站:https://www.kylinos.cn ++ ++ ++ + and + + + +- ++ + <<Privacy>> + 《用户隐私协议》 + + +- ++ + Learn more HP user manual>> + 了解更多 Hp用户手册>> + + +- ++ + See user manual>> + 查看用户手册 + +@@ -100,34 +112,48 @@ + 未激活(试用期) + + +- ++ ++ ++ + Trial expiration time + 试用到期时间 + + +- +- ++ ++ ++ Unknow ++ 未知 ++ ++ ++ ++ + expired + 已过期 + + +- +- ++ ++ Service expiration time ++ 服务到期时间 ++ ++ ++ ++ ++ + Extend + 延长服务 + + +- ++ + The system needs to be restarted to set the HostName, whether to reboot + 计算机名已被修改,需要重启系统才可正常使用。建议立即重启系统! + + +- ++ + Reboot Now + 立即重启 + + +- ++ + Reboot Later + 稍后重启 + +@@ -140,9 +166,9 @@ + 延长服务 + + +- +- +- ++ ++ ++ + avaliable + 可用 + +@@ -159,7 +185,7 @@ + 版权所有2009-2021@kylinos保留所有权利 + + +- ++ + Version + 版本名称 + /About/version +@@ -177,37 +203,37 @@ + 版权所有 © 2009-2021 麒麟软件 保留所有权利。 + + +- ++ + Kernel + 内核 + /About/Kernel + + +- ++ + CPU + CPU + /About/CPU + + +- ++ + Memory + 内存 + /About/Memory + + +- +- ++ ++ + Disk + 硬盘 + + +- ++ + Desktop + 桌面 + /About/Desktop + + +- ++ + User + 用户名 + /About/User +@@ -221,7 +247,7 @@ + 有效期 + + +- ++ + Serial + 序列号 + +@@ -234,8 +260,10 @@ + 序列号 + + +- +- ++ ++ ++ ++ + Active + 激活 + +@@ -252,7 +280,7 @@ + 关于 + + +- ++ + About + 关于 + +@@ -269,13 +297,16 @@ + 可用 + + +- +- ++ ++ ++ ++ + Inactivated + 未激活 + + +- ++ ++ + Activated + 已激活 + +@@ -418,6 +449,7 @@ + AddBtn + + ++ + Add + 添加 + +-- +2.33.0 + diff --git a/ukui-control-center.spec b/ukui-control-center.spec index cfddfc7..ea2d517 100644 --- a/ukui-control-center.spec +++ b/ukui-control-center.spec @@ -1,6 +1,6 @@ Name: ukui-control-center Version: 3.1.2 -Release: 25 +Release: 26 Summary: utilities to configure the UKUI desktop License: GPL-2+ URL: http://www.ukui.org @@ -23,6 +23,7 @@ Patch18: fix-ukui-control-center-3.1.2-activation-button-display-error.patch Patch19: disable-Time-to-sleep-of-kylin.patch Patch20: fix-build-error-of-libkscreen-qt5-5.27.6.patch Patch21: Turn-off-activation-button-hide-operation.patch +Patch22: add-information-for-about.patch BuildRequires: qt5-qtsvg-devel BuildRequires: gsettings-qt-devel BuildRequires: glib2-devel @@ -143,6 +144,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Sep 15 2023 peijiankang - 3.1.2-26 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: add add-information-for-about.patch + * Thu Sep 07 2023 douyan - 3.1.2-25 - Type:Bugfix - ID:NA -- Gitee