diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-03-15 22:34:45 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-03-15 22:34:45 +0100 |
commit | 32df70ed9a55a9ec66c1689a007df9714bee16f5 (patch) | |
tree | e421a4a2fce0e0f2a7269711d690d17c6957d757 /src | |
parent | 2026ee0ea8ea662c7fa9cef0d3a1bc043212f542 (diff) | |
download | ayatana-indicator-power-32df70ed9a55a9ec66c1689a007df9714bee16f5.tar.gz ayatana-indicator-power-32df70ed9a55a9ec66c1689a007df9714bee16f5.tar.bz2 ayatana-indicator-power-32df70ed9a55a9ec66c1689a007df9714bee16f5.zip |
src/utils.c: Use our desktop detection functions for find a way to open an appropriate power settings dialog.
Diffstat (limited to 'src')
-rw-r--r-- | src/utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c index f41b275..2e4c4cb 100644 --- a/src/utils.c +++ b/src/utils.c @@ -55,19 +55,20 @@ utils_handle_settings_request (void) } else #endif + /* XFCE does not set XDG_CURRENT_DESKTOP, it seems... */ if ((!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "xubuntu")) || (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "xfce"))) { control_center_cmd = "xfce4-power-manager-settings"; } - else if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate")) + else if (is_mate()) { control_center_cmd = "mate-power-preferences"; } - else if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Pantheon")) + else if (is_pantheon()) { control_center_cmd = "switchboard --open-plug system-pantheon-power"; } - else + else if (is_unity() || is_gnome()) { gchar *path; |