aboutsummaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/service.c b/src/service.c
index 2670a67..fe69c6d 100644
--- a/src/service.c
+++ b/src/service.c
@@ -692,7 +692,14 @@ on_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
GVariant * param G_GNUC_UNUSED,
gpointer gself G_GNUC_UNUSED)
{
- execute_command ("gnome-control-center power");
+ 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");
+ g_free (path);
}
static void