aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2014-01-10 15:02:31 +1300
committerRobert Ancell <robert.ancell@canonical.com>2014-01-10 15:02:31 +1300
commit1bd93b08e00f2eaad25501a42833cfa24a633747 (patch)
treec9a8dc83c6c1eadac031e34631e09c076e6bf612 /src
parenta253b42d083bc9eefa5b089b02568be40d235171 (diff)
downloadayatana-indicator-power-1bd93b08e00f2eaad25501a42833cfa24a633747.tar.gz
ayatana-indicator-power-1bd93b08e00f2eaad25501a42833cfa24a633747.tar.bz2
ayatana-indicator-power-1bd93b08e00f2eaad25501a42833cfa24a633747.zip
Use unity-control-center if it is available
Diffstat (limited to 'src')
-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