From d500d58869cf07f0df4b8e0c8c8e66d7f776a7a7 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 19 Dec 2014 16:38:14 +0000 Subject: Assume foo is a source image kind for AppData files 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. --- libappstream-glib/as-image.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.1