[gnome-shell] notificationDaemon: Fix sound-file support
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] notificationDaemon: Fix sound-file support
- Date: Wed, 6 Oct 2021 17:43:25 +0000 (UTC)
commit 4d1ce0de41b61ba4ed3b6747095e23d6203f6da5
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>
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 69137b1b23..954ce80687 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -229,11 +229,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]