Commit ca596ee2 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

fixed saving of tags

parent c9c73e7b
......@@ -164,9 +164,9 @@ const char *_LOCATION_TAG_NAMES[] = {
};
const char *_KEYWORDS_TAG_NAMES[] = {
"Xmp::dc::subject",
"Xmp::iptc::Keywords",
"Iptc::Application2::Keywords",
"Xmp::iptc::Keywords",
"Xmp::dc::subject",
NULL
};
......@@ -446,7 +446,7 @@ set_string_list_attribute_from_tagset (GFileInfo *info,
GthStringList *string_list;
g_object_get (metadata, "raw", &raw, NULL);
keywords = g_strsplit (raw, ", ", -1);
keywords = g_strsplit (raw, ",", -1);
string_list = gth_string_list_new_from_strv (keywords);
g_file_info_set_attribute_object (info, attribute, G_OBJECT (string_list));
......
......@@ -102,7 +102,7 @@ gth_string_list_new_from_strv (char **strv)
string_list = g_object_new (GTH_TYPE_STRING_LIST, NULL);
if (strv != NULL) {
for (i = 0; strv[i] != NULL; i++)
string_list->priv->list = g_list_prepend (string_list->priv->list, g_strdup (strv[i]));
string_list->priv->list = g_list_prepend (string_list->priv->list, g_strdup (g_strstrip (strv[i])));
string_list->priv->list = g_list_reverse (string_list->priv->list);
}
else
......
......@@ -849,7 +849,7 @@ gth_tags_entry_get_tags (GthTagsEntry *self,
for (i = 0, j = 0; all_tags[i] != NULL; i++) {
all_tags[i] = g_strstrip (all_tags[i]);
if (all_tags[i][0] != '\0') {
tags[j] = g_strdup (all_tags[i]);
tags[j] = g_strdup (g_strstrip (all_tags[i]));
if (update_globals)
gth_tags_file_add (tags_file, tags[j]);
j++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment