aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-06-19 18:40:31 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-06-19 18:40:31 -0400
commit9d78a433b18fd14af4d3cfa01684c32b93f91966 (patch)
tree50090298c2ddb55dc2fa7c2a3da5a1dce7d699ad /src/service.vala
parenta0773c53b13546f4957f2b2ac1f0455fedc05525 (diff)
downloadayatana-indicator-sound-9d78a433b18fd14af4d3cfa01684c32b93f91966.tar.gz
ayatana-indicator-sound-9d78a433b18fd14af4d3cfa01684c32b93f91966.tar.bz2
ayatana-indicator-sound-9d78a433b18fd14af4d3cfa01684c32b93f91966.zip
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.
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala11
1 files changed, 10 insertions, 1 deletions
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);
}