gthumb r2303 - in trunk: . libgthumb
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gthumb r2303 - in trunk: . libgthumb
- Date: Fri, 14 Mar 2008 19:50:09 +0000 (GMT)
Author: mjc
Date: Fri Mar 14 19:50:09 2008
New Revision: 2303
URL: http://svn.gnome.org/viewvc/gthumb?rev=2303&view=rev
Log:
2008-03-14 Michael J. Chudobiak <mjc svn gnome org>
* libgthumb/file-utils.c: (mime_type_is_raw):
Use gnome_vfs_mime_type_get_equivalence to spot all sub-classes of
image/x-dcraw, so that we don't have to add RAW file types manually
to the mime-checking code. This relies on having a modern version
of freedesktop.org.xml.
Modified:
trunk/ChangeLog
trunk/libgthumb/file-utils.c
Modified: trunk/libgthumb/file-utils.c
==============================================================================
--- trunk/libgthumb/file-utils.c (original)
+++ trunk/libgthumb/file-utils.c Fri Mar 14 19:50:09 2008
@@ -1010,17 +1010,13 @@
mime_type_is_raw (const char *mime_type)
{
return mime_type_is (mime_type, "application/x-crw") /* ? */
- || mime_type_is (mime_type, "image/x-dcraw") /* dcraw */
- || mime_type_is (mime_type, "image/x-minolta-mrw") /* freedesktop.org.xml */
- || mime_type_is (mime_type, "image/x-canon-crw") /* freedesktop.org.xml */
- || mime_type_is (mime_type, "image/x-canon-cr2") /* freedesktop.org.xml */
- || mime_type_is (mime_type, "image/x-nikon-nef") /* freedesktop.org.xml */
- || mime_type_is (mime_type, "image/x-kodak-dcr") /* freedesktop.org.xml */
- || mime_type_is (mime_type, "image/x-kodak-kdc") /* freedesktop.org.xml */
- || mime_type_is (mime_type, "image/x-olympus-orf") /* freedesktop.org.xml */
- || mime_type_is (mime_type, "image/x-fuji-raf") /* freedesktop.org.xml */
- || mime_type_is (mime_type, "image/x-raw") /* mimelnk */
- ;
+ || mime_type_is (mime_type, "image/x-raw") /* mimelnk */
+ || mime_type_is (mime_type, "image/x-dcraw") /* freedesktop.org.xml */
+ || (gnome_vfs_mime_type_get_equivalence (mime_type, "image/x-dcraw")
+ != GNOME_VFS_MIME_UNRELATED); /* freedesktop.org.xml - this should
+ catch most RAW formats, which are
+ registered as sub-classes of
+ image/x-dcraw */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]