aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c7
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;