Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/service.vala: Properly recognize a MATE desktop session when laun… #14

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/service.vala
Expand Up @@ -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)
{
Expand All @@ -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";
Expand Down