aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--data/Makefile.am25
-rw-r--r--data/indicator-messages.conf.in10
-rw-r--r--data/indicator-messages.desktop.in8
-rw-r--r--data/indicator-messages.service.in3
-rw-r--r--data/upstart/Makefile.am12
-rw-r--r--data/upstart/indicator-messages.desktop.in8
-rw-r--r--debian/indicator-messages.install3
8 files changed, 58 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index ab5829a..e27f41d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,6 +169,7 @@ data/icons/48x48/status/Makefile
data/icons/scalable/Makefile
data/icons/scalable/status/Makefile
data/icons/scalable/categories/Makefile
+data/upstart/Makefile
po/Makefile.in
test/Makefile
libmessaging-menu/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index ab12dd6..b991686 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,10 +1,16 @@
-SUBDIRS = icons
+SUBDIRS = icons upstart
-dbus_servicesdir = $(datadir)/dbus-1/services
-dbus_services_DATA = indicator-messages.service
+xdg_autostartdir = /etc/xdg/autostart
+xdg_autostart_DATA = indicator-messages.desktop
-%.service: %.service.in
- sed -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
+%.desktop: %.desktop.in
+ $(AM_V_GEN) sed -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
+
+upstart_jobsdir = $(datadir)/upstart/sessions/
+upstart_jobs_DATA = indicator-messages.conf
+
+%.conf: %.conf.in
+ $(AM_V_GEN) sed -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
gsettings_SCHEMAS = com.canonical.indicator.messages.gschema.xml
@GSETTINGS_RULES@
@@ -13,7 +19,10 @@ indicatordir = $(INDICATOR_DIR)
dist_indicator_DATA = com.canonical.indicator.messages
EXTRA_DIST = \
- $(gsettings_SCHEMAS) \
- indicator-messages.service.in
+ indicator-messages.desktop.in \
+ indicator-messages.conf.in \
+ $(gsettings_SCHEMAS)
-CLEANFILES = indicator-messages.service
+CLEANFILES = \
+ $(xdg_autostart_DATA) \
+ $(upstart_jobs_DATA)
diff --git a/data/indicator-messages.conf.in b/data/indicator-messages.conf.in
new file mode 100644
index 0000000..b300a57
--- /dev/null
+++ b/data/indicator-messages.conf.in
@@ -0,0 +1,10 @@
+description "Indicator Messages Service"
+
+start on indicator-services-start
+stop on desktop-end or indicator-services-end
+
+respawn
+respawn limit 2 10
+
+exec @pkglibexecdir@/indicator-messages-service
+
diff --git a/data/indicator-messages.desktop.in b/data/indicator-messages.desktop.in
new file mode 100644
index 0000000..79c6a43
--- /dev/null
+++ b/data/indicator-messages.desktop.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Indicator Messages
+Exec=@pkglibexecdir@/indicator-messages-service
+StartupNotify=false
+Terminal=false
+OnlyShowIn=Unity;GNOME;
+AutostartCondition=GNOME3 unless-session gnome
diff --git a/data/indicator-messages.service.in b/data/indicator-messages.service.in
deleted file mode 100644
index b3ea054..0000000
--- a/data/indicator-messages.service.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=com.canonical.indicator.messages
-Exec=@pkglibexecdir@/indicator-messages-service
diff --git a/data/upstart/Makefile.am b/data/upstart/Makefile.am
new file mode 100644
index 0000000..c182438
--- /dev/null
+++ b/data/upstart/Makefile.am
@@ -0,0 +1,12 @@
+
+xdg_autostartdir = $(datadir)/upstart/xdg/autostart
+xdg_autostart_DATA = indicator-messages.desktop
+
+%.desktop: %.desktop.in
+ $(AM_V_GEN) sed -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
+
+EXTRA_DIST = \
+ indicator-messages.desktop.in
+
+CLEANFILES = \
+ $(xdg_autostart_DATA)
diff --git a/data/upstart/indicator-messages.desktop.in b/data/upstart/indicator-messages.desktop.in
new file mode 100644
index 0000000..dd0b1d6
--- /dev/null
+++ b/data/upstart/indicator-messages.desktop.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Indicator Messages
+Exec=@pkglibexecdir@/indicator-messages-service
+StartupNotify=false
+Terminal=false
+OnlyShowIn=Unity;
+Hidden=true
diff --git a/debian/indicator-messages.install b/debian/indicator-messages.install
index 7406db8..9ecb1e0 100644
--- a/debian/indicator-messages.install
+++ b/debian/indicator-messages.install
@@ -1,5 +1,6 @@
usr/lib/*/indicator-messages/indicator-messages-service
-usr/share/dbus-1
+usr/share/upstart
usr/share/glib-2.0
usr/share/icons
usr/share/unity/indicators
+etc/xdg/autostart