diff options
author | Xavi Garcia Mena <xavi.garcia.mena@canonical.com> | 2015-10-02 16:07:44 +0200 |
---|---|---|
committer | Xavi Garcia Mena <xavi.garcia.mena@canonical.com> | 2015-10-02 16:07:44 +0200 |
commit | 3e008607e53d4d64a521d6c259d7eedbb1d63e38 (patch) | |
tree | 56dacf0436f97756ec8487a9f1426d3788eff89e | |
parent | a12165624efe06093c1c7392c7ce294a4c4b8e63 (diff) | |
parent | 2b2b43c261b18558d2b5a85c46bb393814fe8aea (diff) | |
download | ayatana-indicator-sound-3e008607e53d4d64a521d6c259d7eedbb1d63e38.tar.gz ayatana-indicator-sound-3e008607e53d4d64a521d6c259d7eedbb1d63e38.tar.bz2 ayatana-indicator-sound-3e008607e53d4d64a521d6c259d7eedbb1d63e38.zip |
merged lp:~seb128/indicator-sound/unity8-system-settings
-rw-r--r-- | debian/changelog | 11 | ||||
-rw-r--r-- | src/service.vala | 18 |
2 files changed, 23 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index d89524b..edac3aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +indicator-sound (12.10.2+15.10.20150812.3-0ubuntu1) vivid; urgency=medium + + [ CI Train Bot ] + * New rebuild forced. + + [ Charles Kerr ] + * When showing a "Loud volumes can damage your hearing" confirmation + warning, clamp the volume until the user hits "OK". (LP: #1481913) + + -- CI Train Bot <ci-train-bot@canonical.com> Wed, 12 Aug 2015 20:55:05 +0000 + indicator-sound (12.10.2+15.10.20150807.6-0ubuntu1) vivid; urgency=medium [ CI Train Bot ] diff --git a/src/service.vala b/src/service.vala index 4857634..a08edf3 100644 --- a/src/service.vala +++ b/src/service.vala @@ -129,12 +129,11 @@ public class IndicatorSound.Service: Object { } private void show_notification(Notify.Notification? n) { - if (n != null) { - try { - n.show (); - } catch (GLib.Error e) { - warning ("Unable to show notification: %s", e.message); - } + return_if_fail (n != null); + try { + n.show (); + } catch (GLib.Error e) { + warning ("Unable to show notification: %s", e.message); } } @@ -207,6 +206,13 @@ public class IndicatorSound.Service: Object { void activate_desktop_settings (SimpleAction action, Variant? param) { var env = Environment.get_variable ("DESKTOP_SESSION"); string cmd; + + if (Environment.get_variable ("MIR_SOCKET") != null) + { + UrlDispatch.send ("settings:///system/sound"); + return; + } + if (env == "xubuntu" || env == "ubuntustudio") cmd = "pavucontrol"; else if (env == "mate") |