plug-ins: in metadata-viewer improve how we show XMP tags.

XMP tags that have multiple values (usually of type XMpBag or XmpSeq) were
shown on one line. Which, especially for long text values, could make it
difficult to see the separate values for that tag.

Let's do the same as we do for IPTC tags that can occur multiple times and
show each value on a separate line.

(cherry picked from commit baaa1380cf)
This commit is contained in:
Jacob Boerema
2021-09-24 15:22:49 -04:00
parent 7a7f209cee
commit 3150f08a0a

View File

@ -597,12 +597,23 @@ metadata_dialog_append_tags (GExiv2Metadata *metadata,
}
else
{
value = metadata_dialog_format_tag_value (metadata, tag,
/* truncate = */ TRUE);
metadata_dialog_add_tag (store, iter,
tag_column, value_column,
tag, value);
g_free (value);
if (g_str_has_prefix (tag, "Xmp.") &&
g_strcmp0 (gexiv2_metadata_get_tag_type (tag), "XmpText") != 0)
{
metadata_dialog_add_multiple_values (GEXIV2_METADATA (metadata),
tag, store,
tag_column,
value_column);
}
else
{
value = metadata_dialog_format_tag_value (metadata, tag,
/* truncate = */ TRUE);
metadata_dialog_add_tag (store, iter,
tag_column, value_column,
tag, value);
g_free (value);
}
}
}
}