diff options
author | Richard Hughes <richard@hughsie.com> | 2014-12-19 16:38:14 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2014-12-19 16:38:30 +0000 |
commit | e65b71626977f1ddcf7f0cfcc54b87cd48c9fcf3 (patch) | |
tree | 20a0e9741fc75ce03025ac2a035e92ba84190bec /libappstream-glib/as-image.c | |
parent | 72c46560b9ff53c5bd228e58e29e8bc24e8a9c6a (diff) | |
download | appstream-glib-e65b71626977f1ddcf7f0cfcc54b87cd48c9fcf3.tar.gz |
Assume <image>foo</iimagemg> 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.
Diffstat (limited to 'libappstream-glib/as-image.c')
-rw-r--r-- | libappstream-glib/as-image.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libappstream-glib/as-image.c b/libappstream-glib/as-image.c index d8e4880..6474dcd 100644 --- a/libappstream-glib/as-image.c +++ b/libappstream-glib/as-image.c @@ -432,7 +432,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) { |