[f-spot] Add missing mime-type and some checks.



commit 86d57a1e5eabdc8d8a06d68d95aae58f2f8c417d
Author: Ruben Vermeersch <ruben savanne be>
Date:   Tue Aug 10 12:40:09 2010 +0200

    Add missing mime-type and some checks.

 .gitmodules                                        |    2 +-
 lib/TagLib/TagLib                                  |    2 +-
 src/Clients/MainApp/FSpot.Imaging/ImageFile.cs     |    6 +++---
 .../MainApp/FSpot.Imaging/Tests/ImageFileTests.cs  |   19 +++++++++++++++++++
 4 files changed, 24 insertions(+), 5 deletions(-)
---
diff --git a/.gitmodules b/.gitmodules
index 3e1ced8..6f0435b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -3,4 +3,4 @@
 	url = git://git.gnome.org/hyena
 [submodule "lib/TagLib/TagLib"]
 	path = lib/TagLib/TagLib
-	url = git://gitorious.org/taglib-sharp/mainline.git
+	url = git://github.com/rubenv/taglib-sharp.git
diff --git a/lib/TagLib/TagLib b/lib/TagLib/TagLib
index ef058da..9d92818 160000
--- a/lib/TagLib/TagLib
+++ b/lib/TagLib/TagLib
@@ -1 +1 @@
-Subproject commit ef058da50ce8d82d8e5740317aceee78f9a807c9
+Subproject commit 9d92818411c42c05798307624ff375c3b4f3fcc2
diff --git a/src/Clients/MainApp/FSpot.Imaging/ImageFile.cs b/src/Clients/MainApp/FSpot.Imaging/ImageFile.cs
index c3d12b7..0db38d2 100644
--- a/src/Clients/MainApp/FSpot.Imaging/ImageFile.cs
+++ b/src/Clients/MainApp/FSpot.Imaging/ImageFile.cs
@@ -56,7 +56,7 @@ namespace FSpot.Imaging {
             name_table ["image/nef"] = name_table ["image/x-nikon-nef"] = name_table [".nef"] = nef_type;
             name_table ["image/rw2"] = name_table ["image/x-raw"] = name_table [".rw2"] = raw_type;
             name_table ["image/pef"] = name_table ["image/x-pentax-pef"] = name_table [".pef"] = nef_type;
-            name_table ["image/raw"] = name_table [".raw"] = nef_type;
+            name_table ["image/raw"] = name_table ["image/x-panasonic-raw"] = name_table [".raw"] = nef_type;
 
             // Other types (FIXME: Currently unsupported by Taglib#, this list should shrink).
 
@@ -68,7 +68,6 @@ namespace FSpot.Imaging {
             name_table [".mrw"] = typeof (FSpot.Imaging.DCRawFile);
             name_table [".raf"] = typeof (FSpot.Imaging.RafFile);
             name_table [".x3f"] = typeof (FSpot.Imaging.DCRawFile);
-            name_table ["image/x-dcraw"] = name_table [".raw"];
             name_table ["image/x-ciff"]  = name_table [".crw"];
             name_table ["image/x-mrw"]   = name_table [".mrw"];
             name_table ["image/x-x3f"]   = name_table [".x3f"];
@@ -77,12 +76,13 @@ namespace FSpot.Imaging {
 
             // as xcf pixbufloader is not part of gdk-pixbuf, check if it's there,
             // and enable it if needed.
-            foreach (Gdk.PixbufFormat format in Gdk.Pixbuf.Formats)
+            foreach (Gdk.PixbufFormat format in Gdk.Pixbuf.Formats) {
                 if (format.Name == "xcf") {
                     if (format.IsDisabled)
                         format.SetDisabled (false);
                     name_table [".xcf"] = base_type;
                 }
+            }
         }
 
         public static bool HasLoader (SafeUri uri)
diff --git a/src/Clients/MainApp/FSpot.Imaging/Tests/ImageFileTests.cs b/src/Clients/MainApp/FSpot.Imaging/Tests/ImageFileTests.cs
index d734449..4ef7e81 100644
--- a/src/Clients/MainApp/FSpot.Imaging/Tests/ImageFileTests.cs
+++ b/src/Clients/MainApp/FSpot.Imaging/Tests/ImageFileTests.cs
@@ -38,6 +38,25 @@ namespace FSpot.Imaging.Tests
 
             Assert.IsFalse (missing, "No missing loaders for Taglib# parseable files.");
         }
+
+        [Test]
+        public void CheckTaglibSupport ()
+        {
+            bool missing = false;
+
+            foreach (var key in ImageFile.NameTable.Keys) {
+                string type = key;
+                if (type.StartsWith ("."))
+                    type = String.Format ("taglib/{0}", type.Substring (1));
+
+                if (!TagLib.FileTypes.AvailableTypes.ContainsKey (type)) {
+                    Log.InformationFormat ("Missing type support in Taglib# for {0}", type);
+                    missing = true;
+                }
+            }
+
+            Assert.IsFalse (missing, "No missing type support in Taglib#.");
+        }
     }
 }
 #endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]