Check that the file mime type is correct (that the files is a music file)

2001-07-15  Anders Carlsson  <andersca@codefactory.se>

	* src/file-manager/fm-icon-view.c (icon_container_preview_callback): Check
	that the file mime type is correct (that the files is a music file) before calling
	nautilus_sound_can_play_sound () since that function launches esd which we
	don't want to do unless we have a music file.
This commit is contained in:
Anders Carlsson 2001-07-15 09:00:44 +00:00 committed by Anders Carlsson
parent 320c3808a8
commit a6971b669d
2 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2001-07-15 Anders Carlsson <andersca@codefactory.se>
* src/file-manager/fm-icon-view.c (icon_container_preview_callback): Check
that the file mime type is correct (that the files is a music file) before calling
nautilus_sound_can_play_sound () since that function launches esd which we
don't want to do unless we have a music file.
2001-07-15 Andy Hertzfeld <andy@differnet.com>
allowed components to specify their sidebar icons and text info
@ -100,6 +107,7 @@
getpid() returns an int. Instead cast it to unsigned long for
printing.
>>>>>>> 1.4689
2001-07-11 Alex Larsson <alexl@redhat.com>
* acconfig.h:

View file

@ -1685,13 +1685,14 @@ icon_container_preview_callback (NautilusIconContainer *container,
/* preview files based on the mime_type. */
/* at first, we just handle sounds */
if (should_preview_sound (file)
&& nautilus_sound_can_play_sound ()) {
if (should_preview_sound (file)) {
mime_type = nautilus_file_get_mime_type (file);
if ((eel_istr_has_prefix (mime_type, "audio/")
|| eel_istr_has_prefix (mime_type, "application/x-ogg"))
&& eel_strcasecmp (mime_type, "audio/x-pn-realaudio") != 0
&& eel_strcasecmp (mime_type, "audio/x-mpegurl") != 0) {
&& eel_strcasecmp (mime_type, "audio/x-mpegurl") != 0
&& nautilus_sound_can_play_sound ()) {
result = 1;
preview_audio (icon_view, file, start_flag);
}