From c3eeb8c7b4a63233226ef76a56221a167510253e Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Wed, 3 Oct 2012 07:48:59 +0200 Subject: validate: Only print hint if no main category is present, not an error The requirement to have at least one main category was removed for the specification a few months ago. It's still useful to tell people with a hint about the risk of not including one, though. See http://lists.freedesktop.org/archives/xdg/2011-November/012123.html Part of https://bugs.freedesktop.org/show_bug.cgi?id=35844 (comment 6 and later) --- src/validate.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/validate.c b/src/validate.c index cde12a2..78e5869 100644 --- a/src/validate.c +++ b/src/validate.c @@ -1484,7 +1484,8 @@ handle_mime_key (kf_validator *kf, * FIXME: it's not really deprecated, so the error message is wrong * + All categories extending the format should start with "X-". * Checked. - * + At least one main category must be included. + * + One main category should be included, otherwise application will appear in + * "catch-all" section of application menu. * Checked. * FIXME: decide if it's okay to have an empty list of categories. * + Some categories, if include, require that another category is included. @@ -1630,12 +1631,12 @@ handle_categories_key (kf_validator *kf, g_strfreev (categories); g_hash_table_destroy (hashtable); - if (!main_category_present) { - print_future_fatal (kf, "value \"%s\" for key \"%s\" in group \"%s\" " - "does not contain a registered main category\n", - value, locale_key, kf->current_group, categories[i]); - retval = FALSE; - } + if (!main_category_present) + print_hint (kf, "value \"%s\" for key \"%s\" in group \"%s\" " + "does not contain a registered main category; application " + "might only show up in a \"catch-all\" section of the " + "application menu\n", + value, locale_key, kf->current_group); return retval; } -- cgit v1.2.3