aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-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
6 files changed, 55 insertions, 11 deletions
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