summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalamurali Viswanathan <balamurali.viswanathan@wipro.com>2004-02-10 09:43:40 +0000
committerBalamurali Viswanathan <bviswa@src.gnome.org>2004-02-10 09:43:40 +0000
commit56405cf413ca7f2813191aca28385be770b81613 (patch)
tree2f494cfd5ebdd9d81dc639577f04af6db483d109
parent6f02d4ae8dcb03de4dc0531b84abb9a0bb93feca (diff)
downloadnautilus-56405cf413ca7f2813191aca28385be770b81613.tar.gz
Use the AUDIODEV env, to play sound files if it is set. Fixes bug #88836
2004-02-10 Balamurali Viswanathan <balamurali.viswanathan@wipro.com> * src/file-manager/fm-icon-view.c (play_file): Use the AUDIODEV env, to play sound files if it is set. Fixes bug #88836
-rw-r--r--ChangeLog5
-rw-r--r--src/file-manager/fm-icon-view.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 937a6febe..340163d66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-10 Balamurali Viswanathan <balamurali.viswanathan@wipro.com>
+
+ * src/file-manager/fm-icon-view.c (play_file): Use the AUDIODEV env,
+ to play sound files if it is set. Fixes bug #88836
+
2004-02-10 Jason Leach <leach@wam.umd.edu>
* libnautilus-private/Makefile.am (install-data-local): Don't
diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c
index 2279b091a..bc2be5108 100644
--- a/src/file-manager/fm-icon-view.c
+++ b/src/file-manager/fm-icon-view.c
@@ -1790,8 +1790,10 @@ play_file (gpointer callback_data)
GnomeVFSResult result;
GnomeVFSHandle *handle;
char *buffer;
+ const char *audio_device = NULL;
GnomeVFSFileSize bytes_read;
+ audio_device = g_getenv ("AUDIODEV");
icon_view = FM_ICON_VIEW (callback_data);
file = icon_view->details->audio_preview_file;
@@ -1816,7 +1818,11 @@ play_file (gpointer callback_data)
} else {
suffix += 1; /* skip the period */
}
- command_str = g_strdup_printf("play -t %s -", suffix);
+ if (audio_device) {
+ command_str = g_strdup_printf("play -d %s -t %s -", audio_device, suffix);
+ } else {
+ command_str = g_strdup_printf("play -t %s -", suffix);
+ }
}
/* read the file with gnome-vfs, feeding it to the sound player's standard input */