diff options
author | Matthias Klumpp <matthias@tenstral.net> | 2016-02-01 18:01:59 +0100 |
---|---|---|
committer | Matthias Klumpp <matthias@tenstral.net> | 2016-02-01 18:01:59 +0100 |
commit | 391da43cb8a9dde042d327e38a7da22bd0d17c78 (patch) | |
tree | 04532adca2468dd8ff7a8ca8295cfaca701c1300 /libappstream-glib | |
parent | 9bae8623a53f9e8628c99dbcd023b1909cf6ea32 (diff) | |
download | appstream-glib-391da43cb8a9dde042d327e38a7da22bd0d17c78.tar.gz |
dep11: Support stock icons
Diffstat (limited to 'libappstream-glib')
-rw-r--r-- | libappstream-glib/as-icon.c | 11 |
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; } |