Compare commits
10 Commits
a0378ba8f3
...
93baf83813
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93baf83813 | ||
|
|
0091964dc0 | ||
|
|
56c62a4203 | ||
|
|
595dcf61a1 | ||
|
|
db8b45dabe | ||
|
|
c0ba945f6f | ||
|
|
67ab1c28ed | ||
|
|
8c28fde801 | ||
|
|
bbd754b7f9 | ||
|
|
b134acf342 |
90
0001-fix-get-Weather-error.patch
Normal file
90
0001-fix-get-Weather-error.patch
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
From 9b05757e476316786e21a902982ed3befb9de443 Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Tue, 17 Jan 2023 13:42:01 +0800
|
||||||
|
Subject: [PATCH] fix get Weather error
|
||||||
|
|
||||||
|
---
|
||||||
|
src/gsettingmanager.cpp | 17 ++++++++++++++---
|
||||||
|
src/gsettingmanager.h | 3 +++
|
||||||
|
2 files changed, 17 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gsettingmanager.cpp b/src/gsettingmanager.cpp
|
||||||
|
index fad7961..ff8630d 100644
|
||||||
|
--- a/src/gsettingmanager.cpp
|
||||||
|
+++ b/src/gsettingmanager.cpp
|
||||||
|
@@ -677,7 +677,7 @@ Q_GLOBAL_STATIC(WeatherGsetting, weatherGsetting)
|
||||||
|
WeatherGsetting::WeatherGsetting()
|
||||||
|
{
|
||||||
|
//获取系统
|
||||||
|
- if (PLATFORM::Intel.compare(PLATFORM::g_platformType,Qt::CaseInsensitive) == 0) {
|
||||||
|
+ if (isFileExist(WEATHER_DESKTOP_FILE)) {
|
||||||
|
const QByteArray id(WEATHER_GSETTING_OLD);
|
||||||
|
if (QGSettings::isSchemaInstalled(id)) {
|
||||||
|
m_pWeatherSetting = new QGSettings(id);
|
||||||
|
@@ -712,7 +712,7 @@ WeatherGsetting *WeatherGsetting::getInstance()
|
||||||
|
QString WeatherGsetting::getWeather()
|
||||||
|
{
|
||||||
|
//获取系统
|
||||||
|
- if (PLATFORM::Intel.compare(PLATFORM::g_platformType,Qt::CaseInsensitive) == 0) {
|
||||||
|
+ if (isFileExist(WEATHER_DESKTOP_FILE)) {
|
||||||
|
const QByteArray id(WEATHER_GSETTING_OLD);
|
||||||
|
if (QGSettings::isSchemaInstalled(id) && m_pWeatherSetting != nullptr \
|
||||||
|
&& m_pWeatherSetting->keys().contains(WEATHER_GSETTING_KEY)) {
|
||||||
|
@@ -740,7 +740,7 @@ QString WeatherGsetting::getWeather()
|
||||||
|
QString WeatherGsetting::getIcon()
|
||||||
|
{
|
||||||
|
//获取系统
|
||||||
|
- if (PLATFORM::Intel.compare(PLATFORM::g_platformType,Qt::CaseInsensitive) == 0) {
|
||||||
|
+ if (isFileExist(WEATHER_DESKTOP_FILE)) {
|
||||||
|
const QByteArray id(WEATHER_GSETTING_OLD);
|
||||||
|
if (QGSettings::isSchemaInstalled(id) && m_pWeatherSetting != nullptr \
|
||||||
|
&& m_pWeatherSetting->keys().contains(WEATHER_GSETTING_KEY)) {
|
||||||
|
@@ -765,6 +765,17 @@ QString WeatherGsetting::getIcon()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool WeatherGsetting::isFileExist(QString FullFileName)
|
||||||
|
+{
|
||||||
|
+ QFileInfo fileInfo(FullFileName);
|
||||||
|
+ if(fileInfo.isFile())
|
||||||
|
+ {
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
//! 护眼中心
|
||||||
|
Q_GLOBAL_STATIC(EyeprotectionGsetting, eyeprotectionGsetting)
|
||||||
|
|
||||||
|
diff --git a/src/gsettingmanager.h b/src/gsettingmanager.h
|
||||||
|
index 7319a27..9440598 100644
|
||||||
|
--- a/src/gsettingmanager.h
|
||||||
|
+++ b/src/gsettingmanager.h
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
#include <QGSettings>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#include <QDebug>
|
||||||
|
+#include <QFileInfo>
|
||||||
|
#include "../platforminfo.h"
|
||||||
|
|
||||||
|
//! 控制中心-个性化部分
|
||||||
|
@@ -293,6 +294,7 @@ private:
|
||||||
|
#define WEATHER_GSETTING_OLD "org.china-weather-data.settings"
|
||||||
|
#define WEATHER_GSETTING_NEW "org.kylin-weather.settings"
|
||||||
|
#define WEATHER_GSETTING_KEY "weather"
|
||||||
|
+#define WEATHER_DESKTOP_FILE "/etc/xdg/autostart/indicator-china-weather.desktop"
|
||||||
|
|
||||||
|
class WeatherGsetting : public QObject
|
||||||
|
{
|
||||||
|
@@ -305,6 +307,7 @@ public:
|
||||||
|
|
||||||
|
QString getWeather();
|
||||||
|
QString getIcon();
|
||||||
|
+ bool isFileExist(QString FullFileName);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QGSettings *m_pWeatherSetting = nullptr;
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
33
0002-fix-userinfo-error-in-sidebar.patch
Normal file
33
0002-fix-userinfo-error-in-sidebar.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 77cd96038f9ba86e48e9aa43222903887517d7a9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Fri, 30 Jun 2023 17:41:11 +0800
|
||||||
|
Subject: [PATCH] fix userinfo error in sidebar
|
||||||
|
|
||||||
|
---
|
||||||
|
.../ukui-quick-operation-panel/accountinformation.cpp | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/plugins/ukui-quick-operation-panel/accountinformation.cpp b/src/plugins/ukui-quick-operation-panel/accountinformation.cpp
|
||||||
|
index 6adfa5f..778b5e7 100644
|
||||||
|
--- a/src/plugins/ukui-quick-operation-panel/accountinformation.cpp
|
||||||
|
+++ b/src/plugins/ukui-quick-operation-panel/accountinformation.cpp
|
||||||
|
@@ -71,8 +71,15 @@ QStringList AccountInformation::getUserObjectPath()
|
||||||
|
QStringList users;
|
||||||
|
QDBusReply<QList<QDBusObjectPath> > reply = m_pSystemUserIface->call("ListCachedUsers");
|
||||||
|
if (reply.isValid()) {
|
||||||
|
- for (QDBusObjectPath op : reply.value())
|
||||||
|
+ bool currentflag = false;
|
||||||
|
+ QString currentpath = "/org/freedesktop/Accounts/User" + QString::number(getuid());
|
||||||
|
+ for (QDBusObjectPath op : reply.value()){
|
||||||
|
users << op.path();
|
||||||
|
+ if(!op.path().compare(currentpath, Qt::CaseSensitive))
|
||||||
|
+ currentflag=true;
|
||||||
|
+ }
|
||||||
|
+ if(!currentflag)
|
||||||
|
+ users << currentpath;
|
||||||
|
}
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
Binary file not shown.
BIN
ukui-sidebar-3.3.0.tar.gz
Normal file
BIN
ukui-sidebar-3.3.0.tar.gz
Normal file
Binary file not shown.
@ -1,12 +1,12 @@
|
|||||||
%define debug_package %{nil}
|
|
||||||
Name: ukui-sidebar
|
Name: ukui-sidebar
|
||||||
Version: 3.0.1
|
Version: 3.3.0
|
||||||
Release: 1
|
Release: 5
|
||||||
Summary: parallels toolbox for UKUI
|
Summary: parallels toolbox for UKUI
|
||||||
License: GPL-3+
|
License: GPL-3+
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
Patch01: 0001-fix-get-Weather-error.patch
|
||||||
|
Patch02: 0002-fix-userinfo-error-in-sidebar.patch
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
BuildRequires: qt5-qtbase-devel
|
BuildRequires: qt5-qtbase-devel
|
||||||
BuildRequires: qt5-qtsvg-devel
|
BuildRequires: qt5-qtsvg-devel
|
||||||
@ -16,17 +16,10 @@ BuildRequires: gsettings-qt-devel
|
|||||||
BuildRequires: dconf-devel
|
BuildRequires: dconf-devel
|
||||||
BuildRequires: libX11-devel
|
BuildRequires: libX11-devel
|
||||||
BuildRequires: kf5-kwindowsystem-devel
|
BuildRequires: kf5-kwindowsystem-devel
|
||||||
BuildRequires: libXtst-devel
|
BuildRequires: libqtxdg-devel
|
||||||
|
BuildRequires: ukui-interface
|
||||||
|
|
||||||
Requires: glib2-devel
|
|
||||||
Requires: qt5-qtbase-devel
|
|
||||||
Requires: qt5-qtsvg-devel
|
|
||||||
Requires: qt5-qtmultimedia-devel
|
|
||||||
Requires: qt5-qttools-devel
|
|
||||||
Requires: gsettings-qt-devel
|
|
||||||
Requires: dconf-devel
|
|
||||||
|
|
||||||
#patch0: fix-plugin-icon.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The ukui-sidebar is mainly used in the desktop operating system.
|
The ukui-sidebar is mainly used in the desktop operating system.
|
||||||
@ -36,17 +29,18 @@ Requires: dconf-devel
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
#%%patch0 -p1
|
%patch01 -p1
|
||||||
|
%patch02 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
qmake-qt5 ..
|
%{qmake_qt5} ..
|
||||||
make
|
%{make_build}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
cd %{_builddir}/%{name}-%{version}/build
|
cd %{_builddir}/%{name}-%{version}/build
|
||||||
make INSTALL_ROOT=%{buildroot} install
|
%{make_install} INSTALL_ROOT=%{buildroot}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -77,10 +71,60 @@ done
|
|||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_libdir}/ukui-sidebar
|
%{_libdir}/ukui-sidebar
|
||||||
%{_datadir}/ukui-sidebar*
|
%{_datadir}/ukui-sidebar*
|
||||||
%{_datadir}/applications/*
|
%{_datadir}/glib-2.0/schemas/
|
||||||
%{_datadir}/ukui-clock/
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 30 2023 peijiankang <peijiankang@kylinos.cn> - 3.3.0-5
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: add 0002-fix-userinfo-error-in-sidebar.patch
|
||||||
|
|
||||||
|
* Sat Jun 17 2023 huayadong <huayadong@kylinos.cn> - 3.3.0-4
|
||||||
|
- remove Recommends: ukui-notebook ukylin-feedback-client ukui-clock
|
||||||
|
|
||||||
|
* Fri Feb 10 2023 peijiankang <peijiankang@kylinos.cn> - 3.3.0-3
|
||||||
|
- add build debuginfo and debugsource
|
||||||
|
|
||||||
|
* Thu Jan 12 2023 peijiankang <peijiankang@kylinos.cn> - 3.3.0-2
|
||||||
|
- fix get Weather error
|
||||||
|
|
||||||
|
* Mon Oct 31 2022 peijiankang <peijiankang@kylinos.cn> - 3.3.0-1
|
||||||
|
- update version to 3.3.0
|
||||||
|
|
||||||
|
* Mon Aug 8 2022 huayadong <huayadong@kylinos.cn> - 3.0.1-12
|
||||||
|
- Fix alarm clock modify the alarm time to one
|
||||||
|
|
||||||
|
* Mon Aug 8 2022 huayadong <huayadong@kylinos.cn> - 3.0.1-11
|
||||||
|
- fix alarm clock in all drop down boxes the highlig
|
||||||
|
|
||||||
|
* Mon May 09 2022 pei-jiankang <peijiankang@kylinos.cn> - 3.0.1-10
|
||||||
|
- add qt5-qtx11extras-devel Requires
|
||||||
|
|
||||||
|
* Wed Apr 06 2022 huayadong <huayadong@kylinos.cn> - 3.0.1-9
|
||||||
|
- Optimize new and close logic
|
||||||
|
|
||||||
|
* Wed Apr 06 2022 tanyulong <tanyulong@kylinos.cn> - 3.0.1-8
|
||||||
|
- add yaml file
|
||||||
|
|
||||||
|
* Thu Dec 09 2021 huayadong <huayadong@kylinos.cn> - 3.0.1-7
|
||||||
|
- Add patch: ukui-sidebar-repair-clock-stopwatch-when-not-started-reset-button.patch
|
||||||
|
|
||||||
|
* Tue Dec 07 2021 huayadong <huayadong@kylinos.cn> - 3.0.1-6
|
||||||
|
- update to upstream version 3.0.0-1+1107
|
||||||
|
|
||||||
|
* Fri Dec 03 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.1-5
|
||||||
|
- modify and update changelog
|
||||||
|
|
||||||
|
* Wed Nov 10 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.1-4
|
||||||
|
- remove junk files
|
||||||
|
|
||||||
|
* Mon Nov 08 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.1-3
|
||||||
|
- modify conflict
|
||||||
|
|
||||||
|
* Tue Nov 02 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.1-2
|
||||||
|
- add changlog
|
||||||
|
|
||||||
* Mon Oct 26 2020 douyan <douyan@kylinos.cn> - 3.0.1-1
|
* Mon Oct 26 2020 douyan <douyan@kylinos.cn> - 3.0.1-1
|
||||||
- update to upstream version 3.0.0-1+1103
|
- update to upstream version 3.0.0-1+1103
|
||||||
|
|
||||||
|
|||||||
4
ukui-sidebar.yaml
Normal file
4
ukui-sidebar.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: UKUI/ukui-sidebar
|
||||||
|
tag_prefix: "^v"
|
||||||
|
separator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user