After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750926 - Add g_notification_set_sound_name()
Add g_notification_set_sound_name()
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: gio
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on: 750931
Blocks:
 
 
Reported: 2015-06-14 08:42 UTC by Patrick Griffis (tingping)
Modified: 2017-11-07 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add g_notification_set_sound_name() (5.34 KB, patch)
2015-06-14 08:42 UTC, Patrick Griffis (tingping)
none Details | Review
Add g_notification_set_sound_name() (5.34 KB, patch)
2015-06-14 11:11 UTC, Patrick Griffis (tingping)
none Details | Review

Description Patrick Griffis (tingping) 2015-06-14 08:42:21 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)
Comment 1 Patrick Griffis (tingping) 2015-06-14 11:03:26 UTC
(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
Comment 2 Patrick Griffis (tingping) 2015-06-14 11:11:57 UTC
Created attachment 305229 [details] [review]
Add g_notification_set_sound_name()

Fixed comment typo.
Comment 3 Philip Withnall 2017-10-26 09:05:11 UTC
What’s the use case for this? See bug #788802 for some general discussion about whether the GNotification API should be extended.
Comment 4 Patrick Griffis (tingping) 2017-10-26 16:58:36 UTC
I wanted to use `new-message-instant` sounds for events in a chat app.
Comment 5 Matthias Clasen 2017-10-27 14:05:46 UTC
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.
Comment 6 Philip Withnall 2017-10-27 15:35:22 UTC
⇒ WONTFIX.
Comment 7 Patrick Griffis (tingping) 2017-10-27 15:38:09 UTC
(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.
Comment 8 Philip Withnall 2017-11-03 12:50:11 UTC
(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.
Comment 9 Patrick Griffis (tingping) 2017-11-03 23:39:48 UTC
(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.