GNOME Bugzilla – Bug 750926
Add g_notification_set_sound_name()
Last modified: 2017-11-07 12:02:31 UTC
Created attachment 305226 [details] [review] Add g_notification_set_sound_name() As title says allows setting sound-names for notifications. This will require a fairly small patch to gnome-shell's GtkNotificationDaemonNotification to expect this but the sound playing already works and is used by the FdoNotificationDaemon. (I'd love if somebody else with a gnome-shell build env could implement that)
(In reply to tingping from comment #0) > This will require a fairly small patch to gnome-shell's > GtkNotificationDaemonNotification to expect this but the sound playing > already works and is used by the FdoNotificationDaemon. bug 750931
Created attachment 305229 [details] [review] Add g_notification_set_sound_name() Fixed comment typo.
What’s the use case for this? See bug #788802 for some general discussion about whether the GNotification API should be extended.
I wanted to use `new-message-instant` sounds for events in a chat app.
just play a sound in your application. There is no need to make notifications even more annoying for this. IMO. Also, the sound theme spec is not exactly an example of a successful specification, and I would prefer to not bake it into shell apis at this point.
⇒ WONTFIX.
(In reply to Matthias Clasen from comment #5) > just play a sound in your application. There is no need to make > notifications even more annoying for this. IMO. There are benefits to this being handled in the shell such as having a single location to configure notificaitons and sounds, being supported via the flatpak portal, and the audio being tied to notification visibility (the shell queues notifications so getting random dings when you don't see the notification is a very janky experience). > Also, the sound theme spec is not exactly an example of a successful > specification, and I would prefer to not bake it into shell apis at this > point. I am not tied to the sound theme spec in any way I just want audio notifications in my chat software.
(In reply to Patrick Griffis (tingping) from comment #7) > (In reply to Matthias Clasen from comment #5) > > just play a sound in your application. There is no need to make > > notifications even more annoying for this. IMO. > > There are benefits to this being handled in the shell such as having a > single location to configure notificaitons and sounds, being supported via > the flatpak portal, and the audio being tied to notification visibility (the > shell queues notifications so getting random dings when you don't see the > notification is a very janky experience). Those are valid points. How does this fit in with the latest changes to notifications in gnome-shell? I want to avoid adding new APIs piecemeal to GNotification, in case they don’t fit in with the overall long-term plan for notifications in the shell.
(In reply to Philip Withnall from comment #8) > (In reply to Patrick Griffis (tingping) from comment #7) > > Those are valid points. How does this fit in with the latest changes to > notifications in gnome-shell? I want to avoid adding new APIs piecemeal to > GNotification, in case they don’t fit in with the overall long-term plan for > notifications in the shell. I'm not sure who to ask about that but I'm not aware of sounds being discussed. I personally submitted a patch (bug #750931) to add it to the org.gtk.Notification service as the org.freedesktop.Notification service in GNOME-Shell already supported it. It is worth noting that every platform/backend other than org.gtk.Notifications (Windows Toasts, OSX Notifications, org.freedesktop.Notification) support specifying sounds in some form also. So regarding the sound-theme spec we could abstract that into `G_NOTIFICATION_SOUND_NEW_MESSAGE` or such.