From c03e4c1261c775ad8ad10e7afba20d5251f551ff Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 19 Dec 2021 08:41:09 +0100 Subject: [PATCH] Make Nheko show up in system notification settings on Linux relates to #845 --- resources/nheko.desktop | 1 + src/notifications/ManagerLinux.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/nheko.desktop b/resources/nheko.desktop index 00d7fda5..4f454a74 100644 --- a/resources/nheko.desktop +++ b/resources/nheko.desktop @@ -9,3 +9,4 @@ Categories=Network;InstantMessaging;Qt; StartupWMClass=nheko Terminal=false MimeType=x-scheme-handler/matrix; +X-GNOME-UsesNotifications=true diff --git a/src/notifications/ManagerLinux.cpp b/src/notifications/ManagerLinux.cpp index 758cb615..14021b96 100644 --- a/src/notifications/ManagerLinux.cpp +++ b/src/notifications/ManagerLinux.cpp @@ -144,8 +144,10 @@ NotificationsManager::systemPostNotification(const QString &room_id, const QImage &icon) { QVariantMap hints; - hints["image-data"] = icon; - hints["sound-name"] = "message-new-instant"; + hints["image-data"] = icon; + hints["sound-name"] = "message-new-instant"; + hints["desktop-entry"] = "nheko"; + QList argumentList; argumentList << "nheko"; // app_name argumentList << (uint)0; // replace_id