diff options
Diffstat (limited to 'src/service.vala')
-rw-r--r-- | src/service.vala | 18 |
1 files changed, 12 insertions, 6 deletions
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") |