diff options
author | Vincent Untz <vuntz@gnome.org> | 2012-10-03 07:48:59 +0200 |
---|---|---|
committer | Vincent Untz <vuntz@gnome.org> | 2012-10-03 11:42:46 +0200 |
commit | c3eeb8c7b4a63233226ef76a56221a167510253e (patch) | |
tree | 71d8ca472541bafe72a68503c6646aace0b57d91 | |
parent | a97707811e2669b6a52a861c41cf46838fab8eb5 (diff) |
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)
-rw-r--r-- | src/validate.c | 15 |
1 files 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; } |