diff options
author | Sebastian Krzyszkowiak <dos@dosowisko.net> | 2020-11-30 02:57:09 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2020-12-02 09:17:22 +0000 |
commit | 6309e2ebf05d932f374f1ab7e519d8c526e95f5c (patch) | |
tree | bdc15f6edc15082d28a5150776e29ccdd5fff965 | |
parent | d4c076d4de12c4715c13dc47113d9d7afa25138b (diff) | |
download | appstream-glib-6309e2ebf05d932f374f1ab7e519d8c526e95f5c.tar.gz |
as-app: Parse launchables from DEP-11
-rw-r--r-- | libappstream-glib/as-app.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index 293f0a0..2caba19 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -5731,6 +5731,18 @@ as_app_node_parse_dep11 (AsApp *app, GNode *node, } continue; } + if (g_strcmp0 (tmp, "Launchable") == 0) { + for (c = n->children; c != NULL; c = c->next) { + for (c2 = c->children; c2 != NULL; c2 = c2->next) { + g_autoptr(AsLaunchable) launchable = NULL; + launchable = as_launchable_new (); + as_launchable_set_kind (launchable, as_launchable_kind_from_string (as_yaml_node_get_key (c))); + as_launchable_set_value (launchable, as_yaml_node_get_key (c2)); + as_app_add_launchable (app, launchable); + } + } + continue; + } if (g_strcmp0 (tmp, "Screenshots") == 0) { for (c = n->children; c != NULL; c = c->next) { g_autoptr(AsScreenshot) ss = NULL; |