summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore2
-rw-r--r--src/Makefile.am25
-rw-r--r--src/libcanberra-login-sound.desktop.in9
-rw-r--r--src/libcanberra-logout-sound.sh.in3
4 files changed, 39 insertions, 0 deletions
diff --git a/src/.gitignore b/src/.gitignore
index e269eeb..5c12b83 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,3 +1,5 @@
+libcanberra-login-sound.desktop
+libcanberra-logout-sound.sh
canberra-gtk-play
.libs
*.o
diff --git a/src/Makefile.am b/src/Makefile.am
index b3acc3c..27208fa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,6 +20,10 @@ gtkmoduledir = @GTK_MODULES_DIR@
plugindir = $(libdir)/libcanberra
+gnomeshutdowndir = $(datadir)/gnome/shutdown
+
+gnomeautostartdir = $(datadir)/gnome/autostart
+
AM_CFLAGS = $(PTHREAD_CFLAGS) -DCA_PLUGIN_PATH=\"$(plugindir)\"
AM_CXXFLAGS = $(PTHREAD_CFLAGS)
AM_LDADD = $(PTHREAD_LIBS)
@@ -233,6 +237,27 @@ canberra_gtk_play_LDADD = \
canberra_gtk_play_CFLAGS = \
$(GTK_CFLAGS)
+EXTRA_DIST += \
+ libcanberra-login-sound.desktop.in \
+ libcanberra-logout-sound.sh.in
+
+gnomeautostart_DATA = \
+ libcanberra-login-sound.desktop
+
+gnomeshutdown_SCRIPTS = \
+ libcanberra-logout-sound.sh
+
+CLEANFILES = \
+ libcanberra-login-sound.desktop \
+ libcanberra-logout-sound.sh
+
+libcanberra-logout-sound.sh: libcanberra-logout-sound.sh.in Makefile
+ sed -e 's,@bindir\@,$(bindir),g' < $< > $@
+ chmod +x $@
+
+libcanberra-login-sound.desktop: libcanberra-login-sound.desktop.in Makefile
+ sed -e 's,@bindir\@,$(bindir),g' < $< > $@
+
endif
test_canberra_SOURCES = \
diff --git a/src/libcanberra-login-sound.desktop.in b/src/libcanberra-login-sound.desktop.in
new file mode 100644
index 0000000..5b4cf7f
--- /dev/null
+++ b/src/libcanberra-login-sound.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Name=GNOME Login Sound
+Exec=@bindir@/canberra-gtk-play --id="desktop-login" --description="GNOME Login"
+OnlyShowIn=GNOME;
+AutostartCondition=GNOME /desktop/gnome/sound/event_sounds
+X-GNOME-Autostart-Phase=Desktop
+X-GNOME-Provides=login-sound
+X-GNOME-Autostart-Notify=true
diff --git a/src/libcanberra-logout-sound.sh.in b/src/libcanberra-logout-sound.sh.in
new file mode 100644
index 0000000..18f3f29
--- /dev/null
+++ b/src/libcanberra-logout-sound.sh.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+@bindir@/canberra-gtk-play --id="desktop-login" --description="GNOME Login"