summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-12-19 16:38:14 +0000
committerRichard Hughes <richard@hughsie.com>2014-12-22 16:00:41 +0000
commitd500d58869cf07f0df4b8e0c8c8e66d7f776a7a7 (patch)
treed8e9a021b272ee9549da3d7989df537bc1fe44b4
parent9de3a75cdade7d325946e4e0855476b34993e37a (diff)
downloadappstream-glib-0_2_X.tar.gz
Assume <image>foo</iimagemg> is a source image kind for AppData files0_2_X
It doesn't make sense to have type="source" for AppData files as they are all of type SOURCE, so just assume this is the default. This fixes screenshots for any package using v0.6+ AppData files.
-rw-r--r--libappstream-glib/as-image.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libappstream-glib/as-image.c b/libappstream-glib/as-image.c
index 0c49e19..b07ba79 100644
--- a/libappstream-glib/as-image.c
+++ b/libappstream-glib/as-image.c
@@ -431,7 +431,9 @@ as_image_node_parse (AsImage *image, GNode *node, GError **error)
if (size != G_MAXINT)
as_image_set_height (image, size);
tmp = as_node_get_attribute (node, "type");
- if (tmp != NULL)
+ if (tmp == NULL)
+ as_image_set_kind (image, AS_IMAGE_KIND_SOURCE);
+ else
as_image_set_kind (image, as_image_kind_from_string (tmp));
taken = as_node_take_data (node);
if (taken != NULL) {