diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2014-01-21 16:42:22 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2014-01-21 16:42:22 +0000 |
commit | 10c22e36e37f07ae412438459638304e41a1f0fc (patch) | |
tree | ca329460016bcfe5e555e2bc9cd38af9e2f1d46d /src/service.c | |
parent | a253b42d083bc9eefa5b089b02568be40d235171 (diff) | |
parent | b118fa57a080aebd620f4f753ad45c2e4f2982d7 (diff) | |
download | ayatana-indicator-power-10c22e36e37f07ae412438459638304e41a1f0fc.tar.gz ayatana-indicator-power-10c22e36e37f07ae412438459638304e41a1f0fc.tar.bz2 ayatana-indicator-power-10c22e36e37f07ae412438459638304e41a1f0fc.zip |
Use unity-control-center if it is available. Fixes: https://bugs.launchpad.net/bugs/1257505.
Approved by Sebastien Bacher, PS Jenkins bot.
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 9 |
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 |