Merge lp:~dylanmccall/notify-osd/sounds-support into lp:notify-osd/lucid
Status: | Needs review | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~dylanmccall/notify-osd/sounds-support | ||||
Merge into: | lp:notify-osd/lucid | ||||
Diff against target: |
453 lines (+293/-3) 6 files modified
configure.in (+1/-1) src/bubble.c (+90/-0) src/bubble.h (+15/-0) src/notification.c (+134/-0) src/notification.h (+21/-0) src/stack.c (+32/-2) |
||||
To merge this branch: | bzr merge lp:~dylanmccall/notify-osd/sounds-support | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mirco Müller (community) | Needs Fixing | ||
Review via email: mp+42788@code.launchpad.net |
Description of the change
This branch adds sounds support, as specified at https:/
The feature can be tested with notify-send:
notify-send --hint=
notify-send --hint=
Note that a bubble's sound plays when it appears, and libcanberra-gtk (+PulseAudio) position the sound so it seems to come from the notification bubble.
Unmerged revisions
- 431. By Dylan McCall
-
Remove type check for suppress-sound hint. If the hint is there, immediately set suppress_sound to TRUE.
- 430. By Dylan McCall
-
Renamed sound-id to sound-name, matching specification at http://
people. canonical. com/~agateau/ notifications- 1.1/spec/ ar01s08. html Set ID for sound-file, sounds, too, so suppress-sound works reliably.
- 429. By Dylan McCall
-
Implement suppress-sound hint. Haven't been able to test this, but it _should_ work, I think...
- 428. By Dylan McCall
-
Initial support for sounds in notify-osd.
This adds a dependency on libcanberra-gtk, which carries out the actual playing of event sounds.
This uses the sound-file hint described in the Desktop Notification Specification.
In addition, there is a non-standard x-sound-id hint.Implementation so far plays sounds, but does not fully comply with the specification. Still need to implement suppress-sounds :)
To test suppress-sound, you'll need a sufficiently long sound (but the file can't be too big or Canberra will refuse to play it). Try something like this:
notify-send --hint= string: sound-file: /home/dylan/ Desktop/ Freedom. ogg --hint= string: suppress- sound: "Testing" "suppress-sound hint"
Run that twice, giving it your own sound-file. The specification on this one wasn't completely clear to me, but my implementation will stop any other notification sounds generated by notify-osd.
I noticed that pynotify doesn't deal in Boolean hints (which the specification wants), and I couldn't find any other hints that were boolean either. So, in revision 431 I made this not look at the type of the hint. If the hint is there, it's assumed that suppress_sound should be True.