aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-03-24 16:16:58 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-03-24 16:16:58 +0000
commit6b2a90208aefc44ae35d4515ebf851f533550a09 (patch)
treec8898346a4103296570e361c8cf7a97f9f21e173
parentd148c14f072a3bd30c410a0d97a9a6bdc3bc465b (diff)
parentc1f559916dcd1b28a0efbcac14c2f49bfd46c651 (diff)
downloadayatana-indicator-datetime-6b2a90208aefc44ae35d4515ebf851f533550a09.tar.gz
ayatana-indicator-datetime-6b2a90208aefc44ae35d4515ebf851f533550a09.tar.bz2
ayatana-indicator-datetime-6b2a90208aefc44ae35d4515ebf851f533550a09.zip
Synchronize process management across indicators
-rw-r--r--.bzrignore1
-rw-r--r--data/CMakeLists.txt20
-rw-r--r--data/indicator-datetime.conf.in3
-rw-r--r--data/indicator-datetime.desktop.in4
-rw-r--r--data/indicator-datetime.upstart.desktop.in9
5 files changed, 34 insertions, 3 deletions
diff --git a/.bzrignore b/.bzrignore
index 5bca87f..691f1e2 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -17,3 +17,4 @@ data/com.canonical.indicator.datetime.gschema.valid
src/libdatetime_la-utils.lo
data/indicator-datetime.conf
data/indicator-datetime.desktop
+data/indicator-datetime.upstart.desktop
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index c45e1f9..5d9e545 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -48,6 +48,26 @@ configure_file ("${XDG_AUTOSTART_FILE_IN}" "${XDG_AUTOSTART_FILE}")
install (FILES "${XDG_AUTOSTART_FILE}"
DESTINATION "${XDG_AUTOSTART_DIR}")
+##
+## Upstart XDG Autostart Override
+##
+
+# where to install
+set (UPSTART_XDG_AUTOSTART_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/upstart/xdg/autostart")
+message (STATUS "${UPSTART_XDG_AUTOSTART_DIR} is the Upstart XDG autostart override dir")
+
+set (UPSTART_XDG_AUTOSTART_NAME "${CMAKE_PROJECT_NAME}.upstart.desktop")
+set (UPSTART_XDG_AUTOSTART_FILE "${CMAKE_CURRENT_BINARY_DIR}/${UPSTART_XDG_AUTOSTART_NAME}")
+set (UPSTART_XDG_AUTOSTART_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${UPSTART_XDG_AUTOSTART_NAME}.in")
+
+# build it
+set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}")
+configure_file ("${UPSTART_XDG_AUTOSTART_FILE_IN}" "${UPSTART_XDG_AUTOSTART_FILE}")
+
+# install it
+install (FILES "${UPSTART_XDG_AUTOSTART_FILE}"
+ DESTINATION "${UPSTART_XDG_AUTOSTART_DIR}"
+ RENAME "${XDG_AUTOSTART_NAME}")
##
## Unity Indicator File
diff --git a/data/indicator-datetime.conf.in b/data/indicator-datetime.conf.in
index ab9cfd6..9b43b96 100644
--- a/data/indicator-datetime.conf.in
+++ b/data/indicator-datetime.conf.in
@@ -1,8 +1,9 @@
description "Indicator Date & Time Backend"
-start on indicators-loaded or indicator-services-start
+start on indicator-services-start
stop on desktop-end or indicator-services-end
respawn
+respawn limit 2 10
exec @pkglibexecdir@/indicator-datetime-service
diff --git a/data/indicator-datetime.desktop.in b/data/indicator-datetime.desktop.in
index 5362af9..4e56947 100644
--- a/data/indicator-datetime.desktop.in
+++ b/data/indicator-datetime.desktop.in
@@ -2,8 +2,8 @@
Type=Application
Name=Indicator Date & Time
Exec=@pkglibexecdir@/indicator-datetime-service
-NotShowIn=Unity;
+OnlyShowIn=Unity;GNOME;
NoDisplay=true
StartupNotify=false
Terminal=false
-
+AutostartCondition=GNOME3 unless-session gnome
diff --git a/data/indicator-datetime.upstart.desktop.in b/data/indicator-datetime.upstart.desktop.in
new file mode 100644
index 0000000..076d373
--- /dev/null
+++ b/data/indicator-datetime.upstart.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Name=Indicator Date & Time
+Exec=@pkglibexecdir@/indicator-datetime-service
+OnlyShowIn=Unity;
+NoDisplay=true
+StartupNotify=false
+Terminal=false
+Hidden=true