[gnome-software/wip/mcrha/as-component-kind] gs-plugin-appstream: Convert component kind to appstream name
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/mcrha/as-component-kind] gs-plugin-appstream: Convert component kind to appstream name
- Date: Tue, 10 Aug 2021 15:02:50 +0000 (UTC)
commit 01f52389be48cd9727d05d841dbdec4b6f467126
Author: Milan Crha <mcrha redhat com>
Date: Tue Aug 10 16:14:00 2021 +0200
gs-plugin-appstream: Convert component kind to appstream name
The appstream-glib uses different name for web-application, which
the appstream doesn't know, thus rather convert the kind in the opposite
way, since the appstream is used these days. This convert is done
just in case there are old appstream data files.
Also drop the 'console' conversion, which looks like a leftover.
plugins/core/gs-plugin-appstream.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index 4518e19d3..f7b3ae428 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -67,10 +67,8 @@ gs_plugin_destroy (GsPlugin *plugin)
static const gchar *
gs_plugin_appstream_convert_component_kind (const gchar *kind)
{
- if (g_strcmp0 (kind, "web-application") == 0)
- return "webapp";
- if (g_strcmp0 (kind, "console-application") == 0)
- return "console";
+ if (g_strcmp0 (kind, "webapp") == 0)
+ return "web-application";
return kind;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]