mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
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:
parent
320c3808a8
commit
a6971b669d
2 changed files with 12 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue