messageTray: Add object holding sound for a notification

A notification can have two ways to specify a sound, via a name of a
sound in the sound theme and/or a file. Therefore introduce an object
that can hold both properties and creates an abstraction over the
different source. This reduces the number of properties for a
notification, which will make it simpler to port it to GObject
properties.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:
Julian Sparber
2024-02-13 19:25:57 +01:00
committed by Florian Müllner
parent f8567bb1a7
commit e4c44fd1ed
2 changed files with 25 additions and 15 deletions

View File

@ -204,8 +204,7 @@ class FdoNotificationDaemon {
gicon,
bannerMarkup: true,
clear: true,
soundFile,
soundName: hints['sound-name'],
sound: new MessageTray.Sound(soundFile, hints['sound-name']),
});
let hasDefaultAction = false;