notificationDaemon: Fix sound-file support

When commit 25bfe99ed5 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>
This commit is contained in:
Florian Müllner 2021-09-27 15:40:05 +02:00 committed by Marge Bot
parent a3dcdaae30
commit 4d1ce0de41

View File

@ -229,11 +229,16 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
if (!gicon)
gicon = this._fallbackIconForNotificationData(hints);
notification.update(summary, body, { gicon,
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: hints['sound-file'],
soundName: hints['sound-name'] });
soundFile,
soundName: hints['sound-name'],
});
let hasDefaultAction = false;