From cfef75a48c0fe6c00b37803d579333884a7baa8a Mon Sep 17 00:00:00 2001 From: Marius Meisenzahl Date: Sat, 22 Aug 2020 08:19:06 +0200 Subject: [PATCH 1/4] Play different sound when notification is urgent --- src/DBus.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DBus.vala b/src/DBus.vala index 3e0e915..948ef57 100644 --- a/src/DBus.vala +++ b/src/DBus.vala @@ -175,7 +175,11 @@ public class Notifications.Server : Object { } } if (app_settings.get_boolean ("sounds")) { - send_sound (hints); + if (priority == GLib.NotificationPriority.URGENT) { + send_sound (hints, "dialog-urgent"); + } else { + send_sound (hints); + } } } } From c6b38b6f7deb56505a89c4ee46d39a04b8638c59 Mon Sep 17 00:00:00 2001 From: Marius Meisenzahl Date: Sun, 27 Sep 2020 14:02:00 +0200 Subject: [PATCH 2/4] Play different sound when priority is high or urgent --- src/DBus.vala | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/DBus.vala b/src/DBus.vala index 948ef57..8300c9c 100644 --- a/src/DBus.vala +++ b/src/DBus.vala @@ -175,10 +175,14 @@ public class Notifications.Server : Object { } } if (app_settings.get_boolean ("sounds")) { - if (priority == GLib.NotificationPriority.URGENT) { - send_sound (hints, "dialog-urgent"); - } else { - send_sound (hints); + switch (priority) { + case GLib.NotificationPriority.HIGH: + case GLib.NotificationPriority.URGENT: + send_sound (hints, "dialog-urgent"); + break; + default: + send_sound (hints); + break; } } } From 0229f107c22c01204ee90a167e9f8dbe02d84835 Mon Sep 17 00:00:00 2001 From: Marius Meisenzahl Date: Wed, 21 Oct 2020 19:14:04 +0200 Subject: [PATCH 3/4] Fix merge branch 'master' --- src/DBus.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DBus.vala b/src/DBus.vala index 2cd375e..588a876 100644 --- a/src/DBus.vala +++ b/src/DBus.vala @@ -138,7 +138,7 @@ public class Notifications.Server : Object { } } if (app_settings.get_boolean ("sounds")) { - switch (priority) { + switch (notification.priority) { case GLib.NotificationPriority.HIGH: case GLib.NotificationPriority.URGENT: send_sound (hints, "dialog-urgent"); From 79fdd41e12e3bcb178c4bb607e2ce9ad05ac1804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20For=C3=A9?= Date: Tue, 15 Jun 2021 13:15:06 -0700 Subject: [PATCH 4/4] Update DBus.vala --- src/DBus.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DBus.vala b/src/DBus.vala index 588a876..828f8d4 100644 --- a/src/DBus.vala +++ b/src/DBus.vala @@ -141,7 +141,7 @@ public class Notifications.Server : Object { switch (notification.priority) { case GLib.NotificationPriority.HIGH: case GLib.NotificationPriority.URGENT: - send_sound (hints, "dialog-urgent"); + send_sound (hints, "dialog-warning"); break; default: send_sound (hints);