aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/service.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/service.c b/src/service.c
index fe69c6d..982a24e 100644
--- a/src/service.c
+++ b/src/service.c
@@ -692,14 +692,29 @@ on_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
GVariant * param G_GNUC_UNUSED,
gpointer gself G_GNUC_UNUSED)
{
- gchar *path;
+ static const gchar *control_center_cmd = NULL;
- 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");
- g_free (path);
+ if (control_center_cmd == NULL)
+ {
+ if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "xubuntu"))
+ {
+ control_center_cmd = "xfce4-power-manager-settings";
+ }
+ else
+ {
+ gchar *path;
+
+ path = g_find_program_in_path ("unity-control-center");
+ if (path != NULL)
+ control_center_cmd = "unity-control-center power";
+ else
+ control_center_cmd = "gnome-control-center power";
+
+ g_free (path);
+ }
+ }
+
+ execute_command (control_center_cmd);
}
static void