gthumb r2263 - in trunk: . libgthumb
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gthumb r2263 - in trunk: . libgthumb
- Date: Wed, 6 Feb 2008 19:33:33 +0000 (GMT)
Author: mjc
Date: Wed Feb 6 19:33:32 2008
New Revision: 2263
URL: http://svn.gnome.org/viewvc/gthumb?rev=2263&view=rev
Log:
2008-02-06 Michael J. Chudobiak <mjc svn gnome org>
* libgthumb/gth-exiv2-utils.cpp:
Filter tag values with has_non_whitespace_text. Next, do the same
some comments and keywords.
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 Wed Feb 6 19:33:32 2008
@@ -332,6 +332,24 @@
}
+static gboolean
+has_non_whitespace_text (const char *text_in)
+{
+ gchar *pos;
+
+ if (text_in == NULL)
+ return FALSE;
+
+ for (pos = (char *) text_in; *pos != 0; pos = g_utf8_next_char (pos)) {
+ gunichar ch = g_utf8_get_char (pos);
+ if (!g_unichar_isspace (ch))
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
/* Add the tag the gThumb metadata store. */
inline static GList *
add (GList *metadata,
@@ -345,12 +363,7 @@
GthMetadata *new_entry;
/* skip blank values */
- if ((formatted_value == NULL) ||
- (formatted_value[0] == '\0') ||
- (formatted_value[0] == '\n') ||
- (formatted_value[0] == '\r') ||
- (formatted_value[0] == '\t') ||
- (formatted_value[0] == ' '))
+ if (!has_non_whitespace_text (formatted_value))
return metadata;
new_entry = g_new (GthMetadata, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]