Merge lp:~jonas-drange/ubuntu-push/lp1413818 into lp:ubuntu-push/automatic
Status: | Merged |
---|---|
Approved by: | Jonas G. Drange |
Approved revision: | 426 |
Merged at revision: | 421 |
Proposed branch: | lp:~jonas-drange/ubuntu-push/lp1413818 |
Merge into: | lp:ubuntu-push/automatic |
Diff against target: |
454 lines (+114/-57) 6 files modified
bus/notifications/raw.go (+14/-4) bus/notifications/raw_test.go (+42/-15) client/service/postal.go (+7/-6) server/session/session_test.go (+4/-2) sounds/sounds.go (+41/-24) sounds/sounds_test.go (+6/-6) |
To merge this branch: | bzr merge lp:~jonas-drange/ubuntu-push/lp1413818 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
dobey (community) | Approve | ||
Review via email: mp+279624@code.launchpad.net |
This proposal supersedes a proposal from 2015-12-03.
Commit message
use Notifications dbus API to play sounds
Description of the change
* Use org.freedesktop
* Sounds module export an interface for testability.
* Sound.Present is unused, but since Unity8 won't play notifications forever, the code is kept.
* Notifications module uses sound module to locate and sanity check file paths from apps.
Testing:
1. Save your current notification somewhere. Get it by running this command:
gdbus call -y -d org.freedesktop
In my case it was (<'/usr/
2. Download an mp3 and copy it to /usr/share/
3. Set the current notification sound to the file from 2:
sudo gdbus call -y -d org.freedesktop
4. Test it.
5. Revert the change:
sudo gdbus call -y -d org.freedesktop
Looks ok to me. I'm not a fan of the sound/Sound usage, but apparently this is a common way to do it in golang, so I'm not going to block on that.