From a7cf30005bff21beb479b994f0ff2d867de2b37f Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Mon, 16 Jul 2018 12:12:07 +0200 Subject: [PATCH 1/2] Update image_data hint to current notification spec The current notification spec says image-data should get used instead of image_data. --- src/notifications/ManagerLinux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notifications/ManagerLinux.cpp b/src/notifications/ManagerLinux.cpp index 34bfeb8a..1a311d9c 100644 --- a/src/notifications/ManagerLinux.cpp +++ b/src/notifications/ManagerLinux.cpp @@ -53,7 +53,7 @@ NotificationsManager::showNotification(const QString summary, const QImage image) { QVariantMap hints; - hints["image_data"] = image; + hints["image-data"] = image; QList argumentList; argumentList << "nheko"; // app_name argumentList << (uint)0; // replace_id From c942a4b9fca5290f40dd93abcdd922b89a860528 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Mon, 16 Jul 2018 12:13:05 +0200 Subject: [PATCH 2/2] Explicitly set no timeout for notifications The notification spec handles -1 and 0 as special values: -1 -> representation for "undef" 0 -> infinitely values above 0 represent the timeout in ms. The notification messages should disappear again and with 0, this insn't the case. Setting it to -1 lets the notification manager decide the timeout and displays the notification like all others. --- src/notifications/ManagerLinux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notifications/ManagerLinux.cpp b/src/notifications/ManagerLinux.cpp index 1a311d9c..d3901c52 100644 --- a/src/notifications/ManagerLinux.cpp +++ b/src/notifications/ManagerLinux.cpp @@ -62,7 +62,7 @@ NotificationsManager::showNotification(const QString summary, argumentList << text; // body argumentList << (QStringList("default") << "reply"); // actions argumentList << hints; // hints - argumentList << (int)0; // timeout in ms + argumentList << (int)-1; // timeout in ms static QDBusInterface notifyApp("org.freedesktop.Notifications", "/org/freedesktop/Notifications",