-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
49 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From a91e08f149b64793fa3c0c0e09c61891f0814535 Mon Sep 17 00:00:00 2001 | ||
From dfb10fdbdc3ae82037366ed4cf039796beca7d6d Mon Sep 17 00:00:00 2001 | ||
From: Lukas Holecek <[email protected]> | ||
Date: Sun, 15 Nov 2020 19:06:53 +0100 | ||
Subject: [PATCH] Support updating Snore notifications | ||
|
@@ -8,7 +8,7 @@ Subject: [PATCH] Support updating Snore notifications | |
1 file changed, 21 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/src/notifybysnore.cpp b/src/notifybysnore.cpp | ||
index b89056b..6607b80 100644 | ||
index a82d0a4..4bf1c53 100644 | ||
--- a/src/notifybysnore.cpp | ||
+++ b/src/notifybysnore.cpp | ||
@@ -61,7 +61,7 @@ NotifyBySnore::NotifyBySnore(QObject *parent) | ||
|
@@ -20,7 +20,7 @@ index b89056b..6607b80 100644 | |
const QByteArray rawNotificationResponse = responseSocket->readAll(); | ||
responseSocket->deleteLater(); | ||
|
||
@@ -177,9 +177,20 @@ void NotifyBySnore::notifyDeferred(KNotification *notification) | ||
@@ -175,9 +175,20 @@ void NotifyBySnore::notifyDeferred(KNotification *notification) | ||
|
||
// handle the icon for toast notification | ||
const QString iconPath = m_iconDir.path() + QLatin1Char('/') + QString::number(notification->id()); | ||
|
@@ -41,7 +41,7 @@ index b89056b..6607b80 100644 | |
snoretoastArgsList << QStringLiteral("-p") << iconPath; | ||
} | ||
|
||
@@ -200,19 +211,20 @@ void NotifyBySnore::notifyDeferred(KNotification *notification) | ||
@@ -207,19 +218,20 @@ void NotifyBySnore::notifyDeferred(KNotification *notification) | ||
const auto data = snoretoastProcess->readAllStandardOutput(); | ||
qCDebug(LOG_KNOTIFICATIONS) << "SnoreToast process stdout:" << snoretoastArgsList << data; | ||
}); | ||
|
@@ -66,7 +66,7 @@ index b89056b..6607b80 100644 | |
}); | ||
|
||
qCDebug(LOG_KNOTIFICATIONS) << "SnoreToast process starting:" << snoretoastArgsList; | ||
@@ -221,6 +233,9 @@ void NotifyBySnore::notifyDeferred(KNotification *notification) | ||
@@ -228,6 +240,9 @@ void NotifyBySnore::notifyDeferred(KNotification *notification) | ||
|
||
void NotifyBySnore::close(KNotification *notification) | ||
{ | ||
|
@@ -76,15 +76,17 @@ index b89056b..6607b80 100644 | |
qCDebug(LOG_KNOTIFICATIONS) << "Requested to close notification with ID:" << notification->id(); | ||
if (m_notifications.constFind(notification->id()) == m_notifications.constEnd()) { | ||
qCWarning(LOG_KNOTIFICATIONS) << "Couldn't find the notification in m_notifications. Nothing to close."; | ||
@@ -239,7 +254,5 @@ void NotifyBySnore::close(KNotification *notification) | ||
@@ -246,9 +261,7 @@ void NotifyBySnore::close(KNotification *notification) | ||
|
||
void NotifyBySnore::update(KNotification *notification, KNotifyConfig *config) | ||
void NotifyBySnore::update(KNotification *notification, const KNotifyConfig ¬ifyConfig) | ||
{ | ||
- Q_UNUSED(notification); | ||
- Q_UNUSED(config); | ||
- Q_UNUSED(notifyConfig); | ||
- qCWarning(LOG_KNOTIFICATIONS) << "updating a notification is not supported yet."; | ||
+ notify(notification, config); | ||
+ notify(notification, notifyConfig); | ||
} | ||
|
||
#include "moc_notifybysnore.cpp" | ||
-- | ||
2.35.1 | ||
2.43.0 | ||
|