diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2014-01-22 17:45:59 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2014-01-22 17:45:59 +0000 |
commit | fec43cc11663f45102e6bb79ca483b8de0fe76bd (patch) | |
tree | 2fddbdfcfcaa06efd5b13a168795e061f208dc83 /src/service.c | |
parent | 4a8f2d77ab357fe62db2a0577db4666e785c06bb (diff) | |
parent | 012768daf0bd8bb92a5fe525af359ff659e02134 (diff) | |
download | ayatana-indicator-datetime-fec43cc11663f45102e6bb79ca483b8de0fe76bd.tar.gz ayatana-indicator-datetime-fec43cc11663f45102e6bb79ca483b8de0fe76bd.tar.bz2 ayatana-indicator-datetime-fec43cc11663f45102e6bb79ca483b8de0fe76bd.zip |
Run the unity-control-center panel under Unity. Rename the unity panel to just "datetime".
Approved by Ted Gould, PS Jenkins bot.
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 16 |
1 files changed, 14 insertions, 2 deletions
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 |