NotificationDaemon: support sound in notifications

The notifications spec has two hints for playing a sound, sound-file
and sound-name. We can support them using the existing code that
wraps libcanberra.

https://bugzilla.gnome.org/show_bug.cgi?id=642831
This commit is contained in:
Giovanni Campagna
2012-11-05 18:10:24 +01:00
parent 2d9cf195d7
commit c30661c44c
4 changed files with 147 additions and 10 deletions

View File

@ -527,7 +527,9 @@ const NotificationDaemon = new Lang.Class({
notification.update(summary, body, { gicon: gicon,
bannerMarkup: true,
clear: true });
clear: true,
soundFile: hints['sound-file'],
soundName: hints['sound-name'] });
notification.setImage(image);
if (actions.length) {
@ -582,7 +584,7 @@ const NotificationDaemon = new Lang.Class({
// 'icon-multi',
'icon-static',
'persistence',
// 'sound',
'sound',
];
},