aboutsummaryrefslogtreecommitdiff
path: root/src/backend-dbus
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2014-01-10 15:14:57 +1300
committerRobert Ancell <robert.ancell@canonical.com>2014-01-10 15:14:57 +1300
commitb673e2d35142b23c3ebc743cd3587e6c9c0d8b68 (patch)
tree2198a42b090f4f15ccaf692fc8e8797f604e4447 /src/backend-dbus
parente8a7320e285d9feb6665c10efea8094ce306c213 (diff)
downloadayatana-indicator-session-b673e2d35142b23c3ebc743cd3587e6c9c0d8b68.tar.gz
ayatana-indicator-session-b673e2d35142b23c3ebc743cd3587e6c9c0d8b68.tar.bz2
ayatana-indicator-session-b673e2d35142b23c3ebc743cd3587e6c9c0d8b68.zip
Use unity-control-center if it is available
Diffstat (limited to 'src/backend-dbus')
-rw-r--r--src/backend-dbus/actions.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/backend-dbus/actions.c b/src/backend-dbus/actions.c
index fcf850d..0369755 100644
--- a/src/backend-dbus/actions.c
+++ b/src/backend-dbus/actions.c
@@ -711,22 +711,44 @@ my_help (IndicatorSessionActions * self G_GNUC_UNUSED)
run_outside_app ("yelp");
}
+static gboolean
+have_unity_control_center (void)
+{
+ gchar *path;
+ gboolean have_ucc;
+
+ path = g_find_program_in_path ("unity-control-center");
+ have_ucc = path != NULL;
+ g_free (path);
+
+ return have_ucc;
+}
+
static void
my_settings (IndicatorSessionActions * self G_GNUC_UNUSED)
{
- run_outside_app ("gnome-control-center");
+ if (have_unity_control_center ())
+ run_outside_app ("unity-control-center");
+ else
+ run_outside_app ("gnome-control-center");
}
static void
my_online_accounts (IndicatorSessionActions * self G_GNUC_UNUSED)
{
- run_outside_app ("gnome-control-center credentials");
+ if (have_unity_control_center ())
+ run_outside_app ("unity-control-center credentials");
+ else
+ run_outside_app ("gnome-control-center credentials");
}
static void
my_about (IndicatorSessionActions * self G_GNUC_UNUSED)
{
- run_outside_app ("gnome-control-center info");
+ if (have_unity_control_center ())
+ run_outside_app ("unity-control-center info");
+ else
+ run_outside_app ("gnome-control-center info");
}
/***