aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Steinbeiß <ochosi@shimmerproject.org>2014-01-21 18:40:02 +0100
committerSimon Steinbeiß <ochosi@shimmerproject.org>2014-01-21 18:40:02 +0100
commitfd8313fc612e355726546a5155c950e16040c134 (patch)
tree1b365f4aa08141c5741cd243ee2224866ef77470 /src
parent10c22e36e37f07ae412438459638304e41a1f0fc (diff)
downloadayatana-indicator-power-fd8313fc612e355726546a5155c950e16040c134.tar.gz
ayatana-indicator-power-fd8313fc612e355726546a5155c950e16040c134.tar.bz2
ayatana-indicator-power-fd8313fc612e355726546a5155c950e16040c134.zip
Add support for opening xfce4-powermanager-settings when in a Xubuntu-session
Diffstat (limited to 'src')
-rw-r--r--src/service.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/service.c b/src/service.c
index fe69c6d..7fead79 100644
--- a/src/service.c
+++ b/src/service.c
@@ -693,12 +693,16 @@ on_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
gpointer gself G_GNUC_UNUSED)
{
gchar *path;
-
- path = g_find_program_in_path ("unity-control-center");
- if (path != NULL)
- execute_command ("unity-control-center power");
- else
- execute_command ("gnome-control-center power");
+ if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity"))
+ {
+ path = g_find_program_in_path ("unity-control-center");
+ if (path != NULL)
+ execute_command ("unity-control-center power");
+ else
+ execute_command ("gnome-control-center power");
+ }
+ else if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "xubuntu"))
+ execute_command ("xfce4-power-manager-settings");
g_free (path);
}