aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2020-11-11 12:08:17 +0100
committerRobert Tari <robert@tari.in>2020-11-11 12:08:17 +0100
commit5c96b6323fac16717874d067b97da45fae52b87e (patch)
treee1e9bfb75a79e2f4267f8ca8dbf4cb69a6c2b9ac
parent20a2e672b6e842b8450ba92cfda7fa9d22c2b63d (diff)
parentbfa42c21659a84698f8e15e5e4de190a13f27850 (diff)
downloadayatana-indicator-sound-5c96b6323fac16717874d067b97da45fae52b87e.tar.gz
ayatana-indicator-sound-5c96b6323fac16717874d067b97da45fae52b87e.tar.bz2
ayatana-indicator-sound-5c96b6323fac16717874d067b97da45fae52b87e.zip
Merge branch 'sunweaver-pr/fix-mate-desktop-detection'
Attributes GH PR #14: https://github.com/AyatanaIndicators/ayatana-indicator-sound/pull/14
-rw-r--r--src/service.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/service.vala b/src/service.vala
index 76f2574..4c9579a 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -251,8 +251,11 @@ public class IndicatorSound.Service: Object {
void activate_desktop_settings (SimpleAction action, Variant? param) {
unowned string env = Environment.get_variable ("DESKTOP_SESSION");
+ unowned string xdg_desktop = Environment.get_variable ("XDG_CURRENT_DESKTOP");
string cmd;
+ /* FIXME: the below code needs to be moved into libayatana-common!!! */
+
#if HAS_URLDISPATCHER
if (Environment.get_variable ("MIR_SOCKET") != null)
{
@@ -263,7 +266,7 @@ public class IndicatorSound.Service: Object {
if (env == "xubuntu" || env == "xfce" || env == "ubuntustudio")
cmd = "pavucontrol";
- else if (env == "mate")
+ else if ((env == "mate" || xdg_desktop == "MATE") && Environment.find_program_in_path ("mate-volume-control") != null)
cmd = "mate-volume-control";
else if (desktop_is_unity() && Environment.find_program_in_path ("unity-control-center") != null)
cmd = "unity-control-center sound";