[gnome-shell/gnome-40] notificationDaemon: Fix sound-file support
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-40] notificationDaemon: Fix sound-file support
- Date: Tue, 2 Nov 2021 15:40:02 +0000 (UTC)
commit 30fbc8ca668ea890a38357989dfa4ef1441dd209
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Sep 27 15:40:05 2021 +0200
notificationDaemon: Fix sound-file support
When commit 25bfe99ed53b5b7 replaced the thin libcanberra wrapper
with the (then) new MetaSoundPlayer API, it missed that the latter
expects files as GFile instead of a file path.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1991>
(cherry picked from commit 4d1ce0de41b61ba4ed3b6747095e23d6203f6da5)
js/ui/notificationDaemon.js | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index f94edb65c2..3c6c6d0333 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -249,11 +249,16 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
if (!gicon)
gicon = this._fallbackIconForNotificationData(hints);
- notification.update(summary, body, { gicon,
- bannerMarkup: true,
- clear: true,
- soundFile: hints['sound-file'],
- soundName: hints['sound-name'] });
+ const soundFile = 'sound-file' in hints
+ ? Gio.File.new_for_path(hints['sound-file']) : null;
+
+ notification.update(summary, body, {
+ gicon,
+ bannerMarkup: true,
+ clear: true,
+ soundFile,
+ soundName: hints['sound-name'],
+ });
let hasDefaultAction = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]