!21 网络异常情况下隐藏托盘icon
From: @peijiankang Reviewed-by: @tanyulong2021 Signed-off-by: @tanyulong2021
This commit is contained in:
commit
a422f2130b
47
0006-Hide-tray-icon-in-case-of-network-exception.patch
Normal file
47
0006-Hide-tray-icon-in-case-of-network-exception.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From 20e81b00cac3c11611ad1a0af74c55af370912c0 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Wed, 29 Jun 2022 10:25:24 +0800
|
||||
Subject: [PATCH] Hide tray icon in case of network exception
|
||||
|
||||
---
|
||||
debian/changelog | 1 +
|
||||
src/mainwindow.cpp | 4 +++-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/debian/changelog b/debian/changelog
|
||||
index a18e2f5..d698926 100644
|
||||
--- a/debian/changelog
|
||||
+++ b/debian/changelog
|
||||
@@ -2,6 +2,7 @@ indicator-china-weather (3.1.0-37) v101; urgency=medium
|
||||
|
||||
* 解决了BUG#30685 程序没有IP定位功能
|
||||
* 解决了BUG#27090 收藏界面国际化问题
|
||||
+ * 解决了BUG#34026 断网情况下隐藏托盘icon
|
||||
|
||||
-- shixiaoshuo <shixiaoshuo@kylinos.cn> Fri,8 Jan 2021 10:33:00 +0800
|
||||
|
||||
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
|
||||
index 4b6ab78..9c43bde 100644
|
||||
--- a/src/mainwindow.cpp
|
||||
+++ b/src/mainwindow.cpp
|
||||
@@ -368,6 +368,7 @@ void MainWindow::initConnections()
|
||||
QStringList listCityId = getCityList().split(",");
|
||||
qDebug()<<"listCityId:"<<listCityId;
|
||||
m_weatherManager->startGetTheWeatherData(listCityId.at(0));
|
||||
+ m_trayIcon->show();
|
||||
} else {
|
||||
if (status == "Fail") {
|
||||
onHandelAbnormalSituation("Without wired Carrier");
|
||||
@@ -554,7 +555,8 @@ void MainWindow::onHandelAbnormalSituation(QString abnormalText){
|
||||
//处理异常时的主界面显示
|
||||
void MainWindow::setAbnormalMainWindow()
|
||||
{
|
||||
- m_trayIcon->setIcon(QIcon::fromTheme(QString("999"), QIcon(QString(":/res/weather_icons/white/999.png"))) );
|
||||
+ //m_trayIcon->setIcon(QIcon::fromTheme(QString("999"), QIcon(QString(":/res/weather_icons/white/999.png"))) );
|
||||
+ m_trayIcon->hide();
|
||||
// m_openAction->setIcon(QIcon::fromTheme(QString("999"), QIcon(QString(":/res/weather_icons/white/999.png"))) );
|
||||
ui->lbCurrTmp->setText("");
|
||||
ui->lbCurrTmpUnit->setText("");
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
%define debug_package %{nil}
|
||||
Name: indicator-china-weather
|
||||
Version: 3.1.0
|
||||
Release: 12
|
||||
Release: 13
|
||||
Summary: The weather data are from the heweather API s6 version.
|
||||
License: GPL-3.0+
|
||||
URL: https://github.com/UbuntuKylin/indicator-china-weather
|
||||
@ -27,6 +27,7 @@ patch2: 0002-Modified-kylin-weather-display-is-incomplete.patch
|
||||
patch3: 0003-add-X-UKUI-AutoRestart-filed-in-desktop.patch
|
||||
patch4: 0004-update-translation-file.patch
|
||||
patch5: 0005-Increase-the-drag-bar-of-forecast-part.patch
|
||||
patch6: 0006-Hide-tray-icon-in-case-of-network-exception.patch
|
||||
|
||||
%description
|
||||
Indicator that displays China weather information
|
||||
@ -42,6 +43,7 @@ patch5: 0005-Increase-the-drag-bar-of-forecast-part.patch
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
||||
%build
|
||||
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default indicator-china-weather.pro
|
||||
@ -73,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/man/man1/indicator-china-weather.1.gz
|
||||
|
||||
%changelog
|
||||
* Wed Jun 29 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.0-13
|
||||
- 网络异常情况下隐藏托盘icon
|
||||
|
||||
* Tue Jun 28 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.0-12
|
||||
- Increase the drag bar of forecast part
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user