[gthumb/ext] Remove the lang= prefix from the xmp text fields.



commit 043d1176d0cc5d1ae3d2a5ae2675278b031e7262
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Dec 27 11:57:35 2009 +0100

    Remove the lang= prefix from the xmp text fields.
    
    [bug #605499]

 extensions/exiv2/exiv2-utils.cpp |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/extensions/exiv2/exiv2-utils.cpp b/extensions/exiv2/exiv2-utils.cpp
index 2edaa3e..e77499f 100644
--- a/extensions/exiv2/exiv2-utils.cpp
+++ b/extensions/exiv2/exiv2-utils.cpp
@@ -208,8 +208,15 @@ set_file_info (GFileInfo  *info,
 		else
 			formatted_value_utf8 = g_locale_to_utf8 (formatted_value, -1, NULL, NULL, NULL);
 	}
-	else
-			formatted_value_utf8 = g_locale_to_utf8 (formatted_value, -1, NULL, NULL, NULL);
+	else {
+		const char *formatted_clean;
+
+		if (strncmp (formatted_value, "lang=", 5) == 0)
+			formatted_clean = strchr (formatted_value, ' ') + 1;
+		else
+			formatted_clean = formatted_value;
+		formatted_value_utf8 = g_locale_to_utf8 (formatted_clean, -1, NULL, NULL, NULL);
+	}
 
 /*
 g_print ("%s (%s): %s (%s)\n", key, description, formatted_value, raw_value);



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