!74 [sync] PR-71: add fix-date-and-nm-of-greeter.patch
From: @openeuler-sync-bot Reviewed-by: @peijiankang Signed-off-by: @peijiankang
This commit is contained in:
commit
fafa68111e
111
fix-date-and-nm-of-greeter.patch
Normal file
111
fix-date-and-nm-of-greeter.patch
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
From a156505e911a65c3933d58707ff39ada1476e08c Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Thu, 6 Jul 2023 17:45:41 +0800
|
||||||
|
Subject: [PATCH] fix date and nm of greeter
|
||||||
|
|
||||||
|
---
|
||||||
|
ukui-greeter/greeter/greeterwindow.cpp | 36 ++++++++++++++++----------
|
||||||
|
ukui-greeter/kylin-nm/src/kylinnm.cpp | 7 +++++
|
||||||
|
ukui-greeter/kylin-nm/src/kylinnm.h | 2 +-
|
||||||
|
3 files changed, 31 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ukui-greeter/greeter/greeterwindow.cpp b/ukui-greeter/greeter/greeterwindow.cpp
|
||||||
|
index 0fe4080..54e81d9 100644
|
||||||
|
--- a/ukui-greeter/greeter/greeterwindow.cpp
|
||||||
|
+++ b/ukui-greeter/greeter/greeterwindow.cpp
|
||||||
|
@@ -793,16 +793,13 @@ void GreeterWindow::updateLanguage(QString userName)
|
||||||
|
qWarning() << "Get User's language error" << languageReply.error();
|
||||||
|
else {
|
||||||
|
formatsLocale = fomatsLocalReply.value().variant().toString();
|
||||||
|
- if(!formatsLocale.isEmpty()){
|
||||||
|
- if(formatsLocale.startsWith("zh")){
|
||||||
|
- local = QLocale::Chinese;
|
||||||
|
- }
|
||||||
|
- else{
|
||||||
|
- local = QLocale::English;
|
||||||
|
+ if(formatsLocale.isEmpty())
|
||||||
|
+ formatsLocale = QLocale::system().name();
|
||||||
|
+ if(formatsLocale.startsWith("zh"))
|
||||||
|
+ local = QLocale::Chinese;
|
||||||
|
+ else
|
||||||
|
+ local = QLocale::English;
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -866,9 +863,17 @@ void GreeterWindow::onCurrentUserChanged(const QModelIndex &index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if(realName == "*guest" || realName == "*login")
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
+ if(realName == "*guest" || realName == "*login"){
|
||||||
|
+ QString language = QLocale::system().name();
|
||||||
|
+ onLanguageChanged(language);
|
||||||
|
+ if(language.startsWith("zh"))
|
||||||
|
+ local = QLocale::Chinese;
|
||||||
|
+ else
|
||||||
|
+ local = QLocale::English;
|
||||||
|
+ timeType=24;
|
||||||
|
+ dataType = "cn";
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
updateLanguage(realName);
|
||||||
|
Q_EMIT currentUserChange(realName);
|
||||||
|
if(!m_sessionHasChanged && m_sessionsModel->rowCount() > 1)
|
||||||
|
@@ -879,6 +884,10 @@ void GreeterWindow::onCurrentUserChanged(const QModelIndex &index)
|
||||||
|
m_configuration->getCurrentUser(realName);
|
||||||
|
timeType = m_configuration->getTimetp("timeType").toInt();
|
||||||
|
dataType = m_configuration->getTimetp("dateType").toString();
|
||||||
|
+ if(timeType == 0)
|
||||||
|
+ timeType = 24;
|
||||||
|
+ if(dataType == "")
|
||||||
|
+ dataType = "cn";
|
||||||
|
timer = new QTimer(this);
|
||||||
|
connect(timer, &QTimer::timeout, this, [&]{
|
||||||
|
if(timeType == 12){
|
||||||
|
@@ -1065,7 +1074,8 @@ void GreeterWindow::onLanguageChanged(QString languageCode)
|
||||||
|
qApp->installTranslator(m_configuration->m_trans);
|
||||||
|
|
||||||
|
m_greeter->setLang(languageCode);
|
||||||
|
-
|
||||||
|
+ if(m_kylinNM)
|
||||||
|
+ m_kylinNM->updatetext();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GreeterWindow::showSessionWnd()
|
||||||
|
diff --git a/ukui-greeter/kylin-nm/src/kylinnm.cpp b/ukui-greeter/kylin-nm/src/kylinnm.cpp
|
||||||
|
index ee3e29e..1ede7aa 100644
|
||||||
|
--- a/ukui-greeter/kylin-nm/src/kylinnm.cpp
|
||||||
|
+++ b/ukui-greeter/kylin-nm/src/kylinnm.cpp
|
||||||
|
@@ -2676,3 +2676,10 @@ void KylinNM::showEvent(QShowEvent *event)
|
||||||
|
{
|
||||||
|
on_btnWifiList_clicked();
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void KylinNM::updatetext()
|
||||||
|
+{
|
||||||
|
+ lbNetListText->setText(tr("LAN"));
|
||||||
|
+
|
||||||
|
+ lbWifiListText->setText(tr("WLAN"));
|
||||||
|
+}
|
||||||
|
diff --git a/ukui-greeter/kylin-nm/src/kylinnm.h b/ukui-greeter/kylin-nm/src/kylinnm.h
|
||||||
|
index 28803f7..c459ee9 100644
|
||||||
|
--- a/ukui-greeter/kylin-nm/src/kylinnm.h
|
||||||
|
+++ b/ukui-greeter/kylin-nm/src/kylinnm.h
|
||||||
|
@@ -182,7 +182,7 @@ public:
|
||||||
|
void updateNetList();
|
||||||
|
|
||||||
|
int getConnectStatus();//获取网络连接状态,返回值 -1 无连接; 0 有线连接; 1无线连接; 2有线和无线都已连接
|
||||||
|
-
|
||||||
|
+ void updatetext();
|
||||||
|
QIcon iconLanOnline, iconLanOffline;
|
||||||
|
QIcon iconWifiFull, iconWifiHigh, iconWifiMedium, iconWifiLow;
|
||||||
|
QIcon iconConnecting;
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: ukui-greeter
|
Name: ukui-greeter
|
||||||
Version: 3.1.2
|
Version: 3.1.2
|
||||||
Release: 10
|
Release: 11
|
||||||
Summary: Lightdm greeter for UKUI
|
Summary: Lightdm greeter for UKUI
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
@ -13,6 +13,7 @@ Patch04: 0004-Fix-the-problem-that-the-login-interface-will-flash-back.patch
|
|||||||
Patch05: disable-Suspend-and-Sleep-of-ukui-greeter.patch
|
Patch05: disable-Suspend-and-Sleep-of-ukui-greeter.patch
|
||||||
%endif
|
%endif
|
||||||
Patch06: translation-error-about-Login.patch
|
Patch06: translation-error-about-Login.patch
|
||||||
|
Patch07: fix-date-and-nm-of-greeter.patch
|
||||||
BuildRequires: pkgconf qt5-qtbase-devel qt5-qtx11extras-devel qt5-qtsvg-devel lightdm-qt5-devel libX11-devel libXtst-devel libXrandr-devel qt5-qttools-devel imlib2-devel xorg-x11-drivers opencv glib2-devel
|
BuildRequires: pkgconf qt5-qtbase-devel qt5-qtx11extras-devel qt5-qtsvg-devel lightdm-qt5-devel libX11-devel libXtst-devel libXrandr-devel qt5-qttools-devel imlib2-devel xorg-x11-drivers opencv glib2-devel
|
||||||
BuildRequires: gsettings-qt-devel
|
BuildRequires: gsettings-qt-devel
|
||||||
Requires: pkgconf
|
Requires: pkgconf
|
||||||
@ -46,10 +47,12 @@ fi
|
|||||||
%patch05 -p1
|
%patch05 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch06 -p1
|
%patch06 -p1
|
||||||
|
%patch07 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
qmake-qt5
|
%{qmake_qt5}
|
||||||
make -j4
|
%{make_build}
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make INSTALL_ROOT=%{buildroot} install
|
make INSTALL_ROOT=%{buildroot} install
|
||||||
@ -72,14 +75,20 @@ gzip -c ukui-greeter/man/ukui-greeter.8 > %{buildroot}/usr/share/man/man8/ukui-
|
|||||||
/usr/lib/ukui-greeter/ukui-greeter-nm-start.sh
|
/usr/lib/ukui-greeter/ukui-greeter-nm-start.sh
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 10 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-11
|
||||||
|
- Type:Bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: add fix-date-and-nm-of-greeter.patch
|
||||||
|
|
||||||
* Thu Jun 15 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-10
|
* Thu Jun 15 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-10
|
||||||
- Type:bugfix
|
- Type:Bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
- DESC: add translation-error-about-Login.patch
|
- DESC: add translation-error-about-Login.patch
|
||||||
|
|
||||||
* Wed Jun 14 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-9
|
* Wed Jun 14 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-9
|
||||||
- Type:bugfix
|
- Type:Bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
- DESC: disable Suspend and Sleep of ukui-greeter
|
- DESC: disable Suspend and Sleep of ukui-greeter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user