summaryrefslogtreecommitdiff
path: root/components/music
diff options
context:
space:
mode:
authorMaciej Stachowiak <mstachow@src.gnome.org>2000-11-02 19:46:52 +0000
committerMaciej Stachowiak <mstachow@src.gnome.org>2000-11-02 19:46:52 +0000
commit7db82cee95a24217914a24f380bda799a309b961 (patch)
treec0245b1a2154eea77704e3d2bb1f9b420d86e52f /components/music
parentda7edc6c66e586686d489d744c50dab4fb7fdf7b (diff)
downloadnautilus-7db82cee95a24217914a24f380bda799a309b961.tar.gz
Install a nautilus-mpg123 symlink that points to the real mpg123 if it
* components/music/Makefile.am: Install a nautilus-mpg123 symlink that points to the real mpg123 if it exists on the system. * components/music/mpg123_handler.c (start_playing_file): Run nautilus-mpg123 * nautilus-clean.sh: Kill nautilus-mpg123 * nautilus-spec.in: Install the nautilus-mpg123 symlink
Diffstat (limited to 'components/music')
-rw-r--r--components/music/Makefile.am9
-rw-r--r--components/music/mpg123_handler.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/components/music/Makefile.am b/components/music/Makefile.am
index 0c7283668..135f67414 100644
--- a/components/music/Makefile.am
+++ b/components/music/Makefile.am
@@ -39,3 +39,12 @@ nautilus_music_view_LDADD = \
$(GNORBA_LIBS)
EXTRA_DIST = $(oaf_DATA)
+
+install-exec-hook:
+ MPG123_PATH=`which mpg123`; \
+ if test -x /usr/bin/mpg123; then \
+ ln -sf /usr/bin/mpg123 $(DESTDIR)/$(bindir)/nautilus-mpg123; \
+ elif test "x$${MPG123_PATH}" != "x"; then \
+ ln -sf "$${MPG123_PATH}" $(DESTDIR)/$(bindir)/nautilus-mpg123; \
+ fi
+
diff --git a/components/music/mpg123_handler.c b/components/music/mpg123_handler.c
index 1700c69f8..a04be2c64 100644
--- a/components/music/mpg123_handler.c
+++ b/components/music/mpg123_handler.c
@@ -650,7 +650,7 @@ void start_playing_file(gchar* filename, gboolean start_from_beginning)
/* create all command line arguments */
- strcpy(cmd_arguments[cmd_cnt],"mpg123");
+ strcpy(cmd_arguments[cmd_cnt],"nautilus-mpg123");
cmd_ptr[cmd_cnt] = cmd_arguments[cmd_cnt];
cmd_cnt++;
@@ -757,7 +757,7 @@ void start_playing_file(gchar* filename, gboolean start_from_beginning)
/* set the group (session) id to this process for future killing */
setsid();
- execvp("mpg123",cmd_ptr);
+ execvp("nautilus-mpg123",cmd_ptr);
printf("unable to run mpg123 (in the path?)\n");
exit(1);
}