[frogr] Improved how tags are imported from XMP
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Improved how tags are imported from XMP
- Date: Thu, 18 Aug 2011 20:09:57 +0000 (UTC)
commit 21ed582f6ee885e9be5a2458d3ba671dfa9efaf3
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Thu Aug 18 22:07:48 2011 +0200
Improved how tags are imported from XMP
src/frogr-picture-loader.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/frogr-picture-loader.c b/src/frogr-picture-loader.c
index e1653a6..c40f91f 100644
--- a/src/frogr-picture-loader.c
+++ b/src/frogr-picture-loader.c
@@ -538,18 +538,16 @@ import_tags_from_xmp_keywords (const char *buffer, size_t len)
keywords_end[0] = '\0';
/* Remove extra not-needed stuff in the string */
- start = g_strstr_len (keywords_start, -1, "<rdf:li>");
+ start = g_strstr_len (keywords_start, -1, "<rdf:li");
end = g_strrstr (keywords_start, "</rdf:li>");
if (start && end)
{
gchar **keywords = NULL;
gchar *keyword = NULL;
- start = &start[8];
- end[0] = '\0';
-
/* Get an array of strings with all the keywords */
- keywords = g_regex_split_simple ("<.?rdf:li>", start,
+ end[0] = '\0';
+ keywords = g_regex_split_simple ("<.?rdf:li(!>)*>", start,
G_REGEX_DOTALL | G_REGEX_RAW, 0);
/* Remove spaces to normalize to flickr tags */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]