Update changelog ukui-notification4.0.1.2-ok5
This commit is contained in:
parent
8da93f97a0
commit
0526d37789
|
@ -1,3 +1,28 @@
|
|||
ukui-notification (4.0.1.2-ok5) yangtze; urgency=medium
|
||||
|
||||
* 重新打包
|
||||
|
||||
-- zhangpengfei <zhangpengfei@kylinos.cn> Wed, 24 Jan 2024 15:08:53 +0800
|
||||
|
||||
ukui-notification (4.0.1.2-ok4) yangtze; urgency=medium
|
||||
|
||||
* 重新打包
|
||||
|
||||
-- zhangpengfei <zhangpengfei@kylinos.cn> Wed, 24 Jan 2024 15:01:52 +0800
|
||||
|
||||
ukui-notification (4.0.1.2-ok3) yangtze; urgency=medium
|
||||
|
||||
* 其他改动:
|
||||
- 修复应用关闭通知接口失效的问题
|
||||
|
||||
-- zhangpengfei <zhangpengfei@kylinos.cn> Wed, 24 Jan 2024 14:52:48 +0800
|
||||
|
||||
ukui-notification (4.0.1.2-ok2) yangtze; urgency=medium
|
||||
|
||||
* 其他改动:
|
||||
- 优化控制中心插件的加载速度
|
||||
|
||||
-- zhangpengfei <zhangpengfei@kylinos.cn> Wed, 24 Jan 2024 14:44:38 +0800
|
||||
ukui-notification (4.0.1.2-ok1) yangtze; urgency=medium
|
||||
|
||||
* Issues: 无
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
From: iaom <zhangpengfei@kylinos.cn>
|
||||
Date: Wed, 24 Jan 2024 15:10:32 +0800
|
||||
Subject: Update changelog ukui-notification4.0.1.2-ok5
|
||||
|
||||
---
|
||||
.../notification-settings/settings-manager.cpp | 7 ++++--
|
||||
notification-server/server.cpp | 11 ++++-----
|
||||
.../notification-ukcc-plugin.cpp | 28 ++++++++++++++++++----
|
||||
.../notification-ukcc-plugin.h | 4 +++-
|
||||
4 files changed, 36 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/libukui-notification/notification-settings/settings-manager.cpp b/libukui-notification/notification-settings/settings-manager.cpp
|
||||
index a991777..246cdd8 100644
|
||||
--- a/libukui-notification/notification-settings/settings-manager.cpp
|
||||
+++ b/libukui-notification/notification-settings/settings-manager.cpp
|
||||
@@ -159,9 +159,12 @@ void SettingsManagerPrivate::updateSettingsFile()
|
||||
|
||||
QStringList SettingsManagerPrivate::getAppInfo()
|
||||
{
|
||||
+ // 过滤掉不需要显示的应用
|
||||
+ UkuiSearch::ApplicationPropertyMap restrictions = {
|
||||
+ {UkuiSearch::ApplicationProperty::DontDisplay, 0}
|
||||
+ };
|
||||
|
||||
- return m_applicationInfo->getInfo(UkuiSearch::ApplicationProperties{},
|
||||
- UkuiSearch::ApplicationPropertyMap{{UkuiSearch::ApplicationProperty::AutoStart, 0}}).keys();
|
||||
+ return m_applicationInfo->getInfo(UkuiSearch::ApplicationProperties{}, restrictions).keys();
|
||||
}
|
||||
|
||||
void SettingsManagerPrivate::initSettingsData(QJsonObject &data)
|
||||
diff --git a/notification-server/server.cpp b/notification-server/server.cpp
|
||||
index 5528237..43d3dc6 100644
|
||||
--- a/notification-server/server.cpp
|
||||
+++ b/notification-server/server.cpp
|
||||
@@ -112,14 +112,11 @@ QString ServerPrivate::GetServerInformation(QString &vendor, QString &version, Q
|
||||
|
||||
void ServerPrivate::CloseNotification(uint id)
|
||||
{
|
||||
- for(const QString &service : m_notificationWatchers->watchedServices()) {
|
||||
- QDBusMessage msg = QDBusMessage::createMethodCall(service,
|
||||
- QStringLiteral("/NotificationClient"),
|
||||
- QStringLiteral("org.ukui.NotificationClient"),
|
||||
- QStringLiteral("CloseNotification"));
|
||||
- msg.setArguments({id, UkuiNotification::NotificationCloseReason::Revoked});
|
||||
- QDBusConnection::sessionBus().call(msg, QDBus::NoBlock);
|
||||
+ if(m_notificationsCache.contains(id)) {
|
||||
+ m_notificationsCache.remove(id);
|
||||
}
|
||||
+ qDebug() << "CloseNotification(Revoked)" << id;
|
||||
+ Q_EMIT NotificationClosed(id, UkuiNotification::NotificationCloseReason::Revoked);
|
||||
}
|
||||
|
||||
bool ServerPrivate::init()
|
||||
diff --git a/notification-ukcc-plugin/notification-ukcc-plugin.cpp b/notification-ukcc-plugin/notification-ukcc-plugin.cpp
|
||||
index 755ccf4..b8ff601 100644
|
||||
--- a/notification-ukcc-plugin/notification-ukcc-plugin.cpp
|
||||
+++ b/notification-ukcc-plugin/notification-ukcc-plugin.cpp
|
||||
@@ -454,18 +454,38 @@ void Notice::initNoticeStatus()
|
||||
|
||||
void Notice::initListUI()
|
||||
{
|
||||
+ // 提前获取所有应用信息,避免在循环中频繁获取
|
||||
+ const UkuiSearch::ApplicationProperties& properties = {
|
||||
+ UkuiSearch::ApplicationProperty::LocalName,
|
||||
+ UkuiSearch::ApplicationProperty::Icon
|
||||
+ };
|
||||
+
|
||||
+ const UkuiSearch::ApplicationPropertyMap& restrictions = {
|
||||
+ {UkuiSearch::ApplicationProperty::DontDisplay, 0}
|
||||
+ };
|
||||
+
|
||||
+ const UkuiSearch::ApplicationInfoMap& appInfoMap = m_appInfo->getInfo(properties, restrictions);
|
||||
+
|
||||
UkuiNotification::ApplicationsSettingsMap appDataMap = UkuiNotification::ApplicationsSettings::self()->getAllApplicationsSettings();
|
||||
UkuiNotification::ApplicationsSettingsMap::const_iterator i = appDataMap.constBegin();
|
||||
while(i != appDataMap.constEnd()) {
|
||||
- initItemUi(i.key(), i.value());
|
||||
+ const QString& desktopPath = i.key();
|
||||
+
|
||||
+ if (!appInfoMap.contains(desktopPath)) {
|
||||
+ qWarning() << "Can't find application info for: " << desktopPath;
|
||||
+ continue;
|
||||
+ } else {
|
||||
+ initItemUi(desktopPath, appInfoMap[desktopPath], i.value());
|
||||
+ }
|
||||
+
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
-void Notice::initItemUi(const QString &desktopPath, UkuiNotification::SingleApplicationSettings *settings)
|
||||
+void Notice::initItemUi(const QString &desktopPath, const UkuiSearch::ApplicationPropertyMap& properties, UkuiNotification::SingleApplicationSettings *settings)
|
||||
{
|
||||
- QString localName = m_appInfo->getInfo(desktopPath, UkuiSearch::ApplicationProperty::LocalName).toString();
|
||||
- QString iconName = m_appInfo->getInfo(desktopPath, UkuiSearch::ApplicationProperty::Icon).toString();
|
||||
+ QString localName = properties[UkuiSearch::ApplicationProperty::LocalName].toString();
|
||||
+ QString iconName = properties[UkuiSearch::ApplicationProperty::Icon].toString();
|
||||
QString fileName = desktopPath.left(desktopPath.indexOf(QLatin1Char('.')));
|
||||
|
||||
QFrame *baseWidget = new QFrame(m_noticeAppFrame);
|
||||
diff --git a/notification-ukcc-plugin/notification-ukcc-plugin.h b/notification-ukcc-plugin/notification-ukcc-plugin.h
|
||||
index 1b4fa8f..41ea4a8 100644
|
||||
--- a/notification-ukcc-plugin/notification-ukcc-plugin.h
|
||||
+++ b/notification-ukcc-plugin/notification-ukcc-plugin.h
|
||||
@@ -66,7 +66,9 @@ public:
|
||||
void initConnection();
|
||||
void initNoticeStatus();
|
||||
void initListUI();
|
||||
- void initItemUi(const QString &desktopPath, UkuiNotification::SingleApplicationSettings *settings);
|
||||
+ void initItemUi(const QString &desktopPath,
|
||||
+ const UkuiSearch::ApplicationPropertyMap& properties,
|
||||
+ UkuiNotification::SingleApplicationSettings *settings);
|
||||
void setAppIcon(QLabel *iconlabel, const QString &icon);
|
||||
|
||||
private:
|
|
@ -1 +1,2 @@
|
|||
0001-Update-changelog-ukui-notification4.0.1.2-ok1.patch
|
||||
0002-Update-changelog-ukui-notification4.0.1.2-ok5.patch
|
||||
|
|
Loading…
Reference in New Issue