From 9d78a433b18fd14af4d3cfa01684c32b93f91966 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Wed, 19 Jun 2013 18:40:31 -0400 Subject: Fold all patches into source These patches didn't apply to the current source. They added support for sound settings panels in various desktop environments. We need a better solution for that, which doesn't require patching the source when a desktop environment wants a different command line. --- src/service.vala | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/service.vala b/src/service.vala index add5658..d638b10 100644 --- a/src/service.vala +++ b/src/service.vala @@ -76,8 +76,17 @@ public class IndicatorSound.Service { uint player_action_update_id; void activate_settings (SimpleAction action, Variant? param) { + var env = Environment.get_variable ("DESKTOP_SESSION"); + string cmd; + if (env == "unity") + cmd = "gnome-control-center sound-nua"; + else if (env == "xubuntu" || env == "ubuntustudio") + cmd = "pavucontrol"; + else + cmd = "gnome-control-center sound"; + try { - Process.spawn_command_line_async ("gnome-control-center sound"); + Process.spawn_command_line_async (cmd); } catch (Error e) { warning ("unable to launch sound settings: %s", e.message); } -- cgit v1.2.3