gthumb r2185 - in trunk: . libgthumb



Author: mjc
Date: Sat Jan 12 20:02:55 2008
New Revision: 2185
URL: http://svn.gnome.org/viewvc/gthumb?rev=2185&view=rev

Log:
2008-01-12  Michael J. Chudobiak  <mjc svn gnome org>

        * libgthumb/gth-exiv2-utils.cpp:
        Removed "group names" from exif tag display names, to keep things
        compact and readable.



Modified:
   trunk/ChangeLog
   trunk/libgthumb/gth-exiv2-utils.cpp

Modified: trunk/libgthumb/gth-exiv2-utils.cpp
==============================================================================
--- trunk/libgthumb/gth-exiv2-utils.cpp	(original)
+++ trunk/libgthumb/gth-exiv2-utils.cpp	Sat Jan 12 20:02:55 2008
@@ -113,10 +113,12 @@
 			//add exif-metadata to glist
 			GthMetadata *new_entry;
 			Exiv2::ExifData::const_iterator end = exifData.end();
-			for (Exiv2::ExifData::const_iterator i = exifData.begin(); i != end; ++i) {
+			for (Exiv2::ExifData::const_iterator md = exifData.begin(); md != end; ++md) {
 				//determine metadata category
 				GthMetadataCategory cat;
-				switch (i->ifdId ()) {
+
+				// FIXME - add category map
+				switch (md->ifdId ()) {
 					//case Exiv2::ifd0Id : cat = GTH_METADATA_CATEGORY_EXIF_IMAGE; break;
 					//case Exiv2::exifIfdId : cat = GTH_METADATA_CATEGORY_EXIF_IMAGE; break;
 					//case Exiv2::iopIfdId : cat = GTH_METADATA_CATEGORY_VERSIONS; break;
@@ -126,11 +128,19 @@
 				}
 				//fill entry
 				stringstream stream;
-				stream << *i;
+				stream << *md;
 				string value = stream.str();
 
-				//disable "improve" untils it works :-)
-				metadata = add (metadata, i->key().c_str(), i->key().c_str(), improve(value).c_str(), cat);
+				stringstream short_name;
+				if (md->ifdId () > Exiv2::ifd1Id) {
+					// Must be a MakerNote - include group name
+					short_name << md->groupName() << "." << md->tagName();
+				} else {
+					// Normal exif tag - just use tag name
+					short_name << md->tagName();	
+				}
+
+				metadata = add (metadata, md->key().c_str(), short_name.str().c_str(), improve(value).c_str(), cat);
 			}
 		}
 



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