aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions-live.cpp15
-rw-r--r--src/service.c16
2 files changed, 27 insertions, 4 deletions
diff --git a/src/actions-live.cpp b/src/actions-live.cpp
index d5f7180..afd83f4 100644
--- a/src/actions-live.cpp
+++ b/src/actions-live.cpp
@@ -55,11 +55,22 @@ void LiveActions::dispatch_url(const std::string& url)
void LiveActions::open_desktop_settings()
{
+ auto path = g_find_program_in_path("unity-control-center");
+
+ if ((path != nullptr) && (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity") == 0))
+ {
+ execute_command("unity-control-center datetime");
+ }
+ else
+ {
#ifdef HAVE_CCPANEL
- execute_command("gnome-control-center indicator-datetime");
+ execute_command("gnome-control-center indicator-datetime");
#else
- execute_command("gnome-control-center datetime");
+ execute_command("gnome-control-center datetime");
#endif
+ }
+
+ g_free (path);
}
void LiveActions::open_planner()
diff --git a/src/service.c b/src/service.c
index 246ea70..746ced9 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1466,11 +1466,23 @@ on_desktop_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
GVariant * param G_GNUC_UNUSED,
gpointer gself G_GNUC_UNUSED)
{
+ gchar *path;
+
+ path = g_find_program_in_path ("unity-control-center");
+ if (path != NULL && g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity") == 0)
+ {
+ execute_command ("unity-control-center datetime");
+ }
+ else
+ {
#ifdef HAVE_CCPANEL
- execute_command ("gnome-control-center indicator-datetime");
+ execute_command ("gnome-control-center indicator-datetime");
#else
- execute_command ("gnome-control-center datetime");
+ execute_command ("gnome-control-center datetime");
#endif
+ }
+
+ g_free (path);
}
static void