aboutsummaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2014-01-22 11:46:36 +0100
committerLars Uebernickel <lars.uebernickel@canonical.com>2014-01-22 11:46:36 +0100
commit12febda4ce88f9f319435ff1620e222365a05a29 (patch)
treef92ce684601f0cea14d79277d33e7496b54daa4f /src/service.c
parent2f5e7c9b93ea31fd7a123c845bc0e9a3632f4903 (diff)
downloadayatana-indicator-power-12febda4ce88f9f319435ff1620e222365a05a29.tar.gz
ayatana-indicator-power-12febda4ce88f9f319435ff1620e222365a05a29.tar.bz2
ayatana-indicator-power-12febda4ce88f9f319435ff1620e222365a05a29.zip
service.c: execute unity-control-center on desktops other than unity as well
The fallback session uses the indicators as well but doesn't have $XDG_CURRENT_DESKTOP set to "Unity".
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/service.c b/src/service.c
index a2fc638..ab5deb5 100644
--- a/src/service.c
+++ b/src/service.c
@@ -692,7 +692,11 @@ on_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
GVariant * param G_GNUC_UNUSED,
gpointer gself G_GNUC_UNUSED)
{
- if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity"))
+ if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "xubuntu"))
+ {
+ execute_command ("xfce4-power-manager-settings");
+ }
+ else
{
gchar *path;
@@ -704,8 +708,6 @@ on_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
g_free (path);
}
- else if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "xubuntu"))
- execute_command ("xfce4-power-manager-settings");
}
static void