Revision: 1538
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1538&view=rev
Author:   nadvornik
Date:     2009-03-15 12:41:39 +0000 (Sun, 15 Mar 2009)

Log Message:
-----------
fixed XMP and IPTC entry names in exif pane

Modified Paths:
--------------
    trunk/src/exiv2.cc

Modified: trunk/src/exiv2.cc
===================================================================
--- trunk/src/exiv2.cc  2009-03-15 12:20:14 UTC (rev 1537)
+++ trunk/src/exiv2.cc  2009-03-15 12:41:39 UTC (rev 1538)
@@ -797,12 +797,27 @@
 {
        try {
                Exiv2::ExifKey ekey(key);
-               return 
utf8_validate_or_convert(Exiv2::ExifTags::tagLabel(ekey.tag(), ekey.ifdId ()));
+               return utf8_validate_or_convert(ekey.tagLabel().c_str());
        }
        catch (Exiv2::AnyError& e) {
-               std::cout << "Caught Exiv2 exception '" << e << "'\n";
-               return NULL;
+               try {
+                       Exiv2::IptcKey ikey(key);
+                       return 
utf8_validate_or_convert(ikey.tagLabel().c_str());
+               }
+               catch (Exiv2::AnyError& e) {
+                       try {
+#if EXIV2_TEST_VERSION(0,16,0)
+                               Exiv2::XmpKey xkey(key);
+                               return 
utf8_validate_or_convert(xkey.tagLabel().c_str());
+#endif
+                       }
+                       catch (Exiv2::AnyError& e) {
+                               std::cout << "Caught Exiv2 exception '" << e << 
"'\n";
+                               return NULL;
+                       }
+               }
        }
+       return NULL;
 }
 
 static const AltKey *find_alt_key(const gchar *xmp_key)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to