Notification sound picker: list each OS's own sounds
Facebook Messenger on your desktop, without the Facebook clutter
Brought to you by:
kristoffer-r
Originally created by: kristofferR
[#363] adds a notification sound picker, with bundled sounds and "Choose file…". Every OS already ships notification sounds people know from other apps, and listing them is cheaper and more familiar than bundling our own. Some platforms also limit what a notification can play, which the picker has to follow.
The [#363] picker lists the sounds the OS provides, and each choice plays reliably on that platform.
.aiff, .caf and .wav from /System/Library/Sounds and ~/Library/Sounds, by name without the extension. Deliver with UNNotificationSound.soundNamed, which looks in both folders, so nothing is copied. Preview with NSSound(named:).ms-winsoundevent:Notification.Default, .IM, .Mail, .Reminder, .SMS). Today Chatpane always uses Notification.Default (windows/toast.rs). Microsoft documents custom toast audio files (ms-appx:, ms-appdata:) only for packaged apps, and Chatpane is installed without a package. So a bundled or chosen file means a silent toast (<audio silent="true"/>) and Chatpane plays the file itself. Confirm on a real build.sound-name hint message-new-instant today. Offer the message-related names from the active freedesktop sound theme (for example message-new-instant, message, bell). Many notification daemons ignore sound hints, though, so for reliable sound Chatpane should play the file itself and send suppress-sound. Decide during [#363] whether that is always or only for daemons that don't advertise the sound capability.~/Library/Sounds shows up the next time Settings opens.Part of [#363].