summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-icon.c
diff options
context:
space:
mode:
authorMatthias Klumpp <matthias@tenstral.net>2016-02-01 18:01:59 +0100
committerMatthias Klumpp <matthias@tenstral.net>2016-02-01 18:01:59 +0100
commit391da43cb8a9dde042d327e38a7da22bd0d17c78 (patch)
tree04532adca2468dd8ff7a8ca8295cfaca701c1300 /libappstream-glib/as-icon.c
parent9bae8623a53f9e8628c99dbcd023b1909cf6ea32 (diff)
downloadappstream-glib-391da43cb8a9dde042d327e38a7da22bd0d17c78.tar.gz
dep11: Support stock icons
Diffstat (limited to 'libappstream-glib/as-icon.c')
-rw-r--r--libappstream-glib/as-icon.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libappstream-glib/as-icon.c b/libappstream-glib/as-icon.c
index 0f6530c..739234f 100644
--- a/libappstream-glib/as-icon.c
+++ b/libappstream-glib/as-icon.c
@@ -703,10 +703,13 @@ gboolean
as_icon_node_parse_dep11 (AsIcon *im, GNode *node,
AsNodeContext *ctx, GError **error)
{
- if (g_strcmp0 (as_yaml_node_get_key (node), "cached") != 0)
- return TRUE;
- as_icon_set_name (im, as_yaml_node_get_value (node));
- as_icon_set_kind (im, AS_ICON_KIND_CACHED);
+ if (g_strcmp0 (as_yaml_node_get_key (node), "cached") == 0) {
+ as_icon_set_name (im, as_yaml_node_get_value (node));
+ as_icon_set_kind (im, AS_ICON_KIND_CACHED);
+ } else if (g_strcmp0 (as_yaml_node_get_key (node), "stock") == 0) {
+ as_icon_set_name (im, as_yaml_node_get_value (node));
+ as_icon_set_kind (im, AS_ICON_KIND_STOCK);
+ }
return TRUE;
}