diff options
author | Richard Hughes <richard@hughsie.com> | 2015-09-18 11:41:55 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-09-18 11:42:19 +0100 |
commit | dad7259e912d928166bfdb4e65d480cbdea19571 (patch) | |
tree | 3b932b99f07e2d72271310400a543263614e91e4 | |
parent | 51ccde3a56103376007681c350fbb64c2422dbd5 (diff) | |
download | appstream-glib-dad7259e912d928166bfdb4e65d480cbdea19571.tar.gz |
Use a sensible warning when processing desktop files with NoDisplay=true
-rw-r--r-- | libappstream-builder/plugins/asb-plugin-desktop.c | 3 | ||||
-rw-r--r-- | libappstream-glib/as-app.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libappstream-builder/plugins/asb-plugin-desktop.c b/libappstream-builder/plugins/asb-plugin-desktop.c index 8340572..deeab2a 100644 --- a/libappstream-builder/plugins/asb-plugin-desktop.c +++ b/libappstream-builder/plugins/asb-plugin-desktop.c @@ -290,7 +290,8 @@ asb_plugin_desktop_refine (AsbPlugin *plugin, GError **error) { AsIcon *icon; - AsAppParseFlags parse_flags = AS_APP_PARSE_FLAG_USE_HEURISTICS; + AsAppParseFlags parse_flags = AS_APP_PARSE_FLAG_USE_HEURISTICS | + AS_APP_PARSE_FLAG_ALLOW_VETO; gboolean ret; g_autofree gchar *app_id = NULL; g_autoptr(AsApp) desktop_app = NULL; diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index 3b89aba..5cbfb3f 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -2701,6 +2701,12 @@ as_app_subsume_private (AsApp *app, AsApp *donor, AsAppSubsumeFlags flags) as_app_add_kudo (app, tmp); } + /* vetos */ + for (i = 0; i < priv->vetos->len; i++) { + tmp = g_ptr_array_index (priv->vetos, i); + as_app_add_veto (app, "%s", tmp); + } + /* categories */ for (i = 0; i < priv->categories->len; i++) { tmp = g_ptr_array_index (priv->categories, i); |