diff options
author | Iain Lane <iain@orangesquash.org.uk> | 2017-07-10 13:54:21 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2017-07-10 14:09:36 +0100 |
commit | 788720986b6fb1a93eed67e2147937857d6d0faf (patch) | |
tree | 86a991f328ed85f83ddc61431e895637213cd8c0 /libappstream-glib/as-app.c | |
parent | 583f9c50224ad2435d11b92807a8b4b791ad45ed (diff) | |
download | appstream-glib-788720986b6fb1a93eed67e2147937857d6d0faf.tar.gz |
Support CompulsoryForDesktops in YAML
So that software centres don't present them as removable.
Closes #175
Diffstat (limited to 'libappstream-glib/as-app.c')
-rw-r--r-- | libappstream-glib/as-app.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index 1a73068..fe0e310 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -5565,6 +5565,17 @@ as_app_node_parse_dep11 (AsApp *app, GNode *node, as_app_set_project_group (app, as_yaml_node_get_value (n)); continue; } + if (g_strcmp0 (tmp, "CompulsoryForDesktops") == 0) { + for (c = n->children; c != NULL; c = c->next) { + tmp = as_yaml_node_get_key (c); + if (tmp == NULL) { + nonfatal_str = "contained empty desktop"; + continue; + } + as_app_add_compulsory_for_desktop (app, tmp); + } + continue; + } } if (nonfatal_str != NULL) { g_debug ("nonfatal warning from %s: %s", |