From dad7259e912d928166bfdb4e65d480cbdea19571 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 18 Sep 2015 11:41:55 +0100 Subject: Use a sensible warning when processing desktop files with NoDisplay=true --- libappstream-builder/plugins/asb-plugin-desktop.c | 3 ++- libappstream-glib/as-app.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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); -- cgit v1.2.1