From 1bd93b08e00f2eaad25501a42833cfa24a633747 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 10 Jan 2014 15:02:31 +1300 Subject: Use unity-control-center if it is available --- debian/control | 2 +- src/service.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index f0ed35e..ea98d7c 100644 --- a/debian/control +++ b/debian/control @@ -24,7 +24,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, upower, -Recommends: gnome-control-center (>= 3.1) | ubuntu-system-settings, +Recommends: gnome-control-center (>= 3.1) | unity-control-center | ubuntu-system-settings, indicator-applet (>= 0.2) | indicator-renderer, Description: Indicator showing power state. This indicator displays current power management information and gives 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 -- cgit v1.2.3 From b118fa57a080aebd620f4f753ad45c2e4f2982d7 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 14 Jan 2014 17:40:27 +1300 Subject: Recommend unity-control-center before gnome-control-center --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index ea98d7c..d64c903 100644 --- a/debian/control +++ b/debian/control @@ -24,7 +24,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, upower, -Recommends: gnome-control-center (>= 3.1) | unity-control-center | ubuntu-system-settings, +Recommends: unity-control-center | gnome-control-center (>= 3.1) | ubuntu-system-settings, indicator-applet (>= 0.2) | indicator-renderer, Description: Indicator showing power state. This indicator displays current power management information and gives -- cgit v1.2.3