summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2023-08-09 13:11:40 +0200
committerraveit65 <[email protected]>2023-08-10 00:13:05 +0200
commit8243a01d5755213af68025885531e381a6995928 (patch)
tree320cf9757f83ccdcdb72e8776d67d560b8a3318e
parent37e33b5fdd3c52c131045b4bebcacb9283f9883f (diff)
downloadmate-notification-daemon-8243a01d5755213af68025885531e381a6995928.tar.bz2
mate-notification-daemon-8243a01d5755213af68025885531e381a6995928.tar.xz
Auto-start m-n-d with session
Relying on D-Bus activation to launch org.freedesktop.Notifications can result in selecting the wrong implementation if multiple daemons are installed. Fix this by launching m-n-d with the session rather than depending on D-Bus activation. We keep D-Bus activation for the moment for backward compatibility and to re-start the daemon in otherwise non-problematic situations if it crashes. Fixes #133 and #174.
-rw-r--r--configure.ac1
-rw-r--r--data/Makefile.am13
-rw-r--r--data/mate-notification-daemon.desktop.in.in14
3 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 32aae7d..8e451c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -284,6 +284,7 @@ AM_CONDITIONAL([ICON_UPDATE], [test -n "$UPDATE_ICON_CACHE"])
AC_CONFIG_FILES([
Makefile
data/Makefile
+data/mate-notification-daemon.desktop.in
data/org.freedesktop.mate.Notifications.service
data/org.mate.applets.MateNotificationApplet.desktop.in
data/org.mate.NotificationDaemon.gschema.xml
diff --git a/data/Makefile.am b/data/Makefile.am
index a666d7a..3358d92 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -16,6 +16,17 @@ servicedir = $(DBUS_SERVICES_DIR)
service_DATA = org.freedesktop.mate.Notifications.service org.mate.panel.applet.MateNotificationAppletFactory.service
service_in_files = $(service_DATA:=.in)
+autostartdir = $(sysconfdir)/xdg/autostart
+autostart_in_files = mate-notification-daemon.desktop.in
+autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
+
+$(autostart_DATA): $(autostart_in_files)
+if USE_NLS
+ $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+else
+ $(AM_V_GEN) sed '/^# Translators/d' < $< > $@
+endif
+
appletdir = $(datadir)/mate-panel/applets
applet_DATA = org.mate.applets.MateNotificationApplet.mate-panel-applet
applet_in_files = $(applet_DATA:.mate-panel-applet=.desktop.in)
@@ -43,6 +54,7 @@ gsettingsschema_in_files = $(gsettings_SCHEMAS:=.in)
@GSETTINGS_RULES@
EXTRA_DIST = \
+ $(autostart_in_files) \
$(desktop_in_files) \
$(gsettingsschema_in_files) \
$(icon16_DATA) \
@@ -53,6 +65,7 @@ EXTRA_DIST = \
$(iconscalable_DATA)
CLEANFILES = \
+ $(autostart_DATA) \
$(applet_DATA) \
$(desktop_DATA) \
$(gsettings_SCHEMAS)
diff --git a/data/mate-notification-daemon.desktop.in.in b/data/mate-notification-daemon.desktop.in.in
new file mode 100644
index 0000000..15cf95f
--- /dev/null
+++ b/data/mate-notification-daemon.desktop.in.in
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Name=MATE Notification Daemon
+Comment=Display notifications
+Exec=@LIBEXECDIR@/mate-notification-daemon
+Terminal=false
+Type=Application
+OnlyShowIn=MATE;
+NoDisplay=true
+X-MATE-Autostart-Phase=Application
+X-MATE-Autostart-Notify=true
+X-MATE-Bugzilla-Bugzilla=MATE
+X-MATE-Bugzilla-Product=mate-notification-daemon
+X-MATE-Bugzilla-Component=general
+X-MATE-Bugzilla-Version=@VERSION@