[gnome-software/wip/mcrha/as-component-kind: 18/18] 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: 18/18] gs-plugin-appstream: Convert component kind to appstream name
- Date: Tue, 10 Aug 2021 14:18:47 +0000 (UTC)
commit 982f3ea5e42d0f21c4c66deeec76bfbd33a53f13
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 and
console-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.
plugins/core/gs-plugin-appstream.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index 4518e19d3..8a9beafa5 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -67,10 +67,10 @@ 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";
+ if (g_strcmp0 (kind, "console") == 0)
+ return "console-application";
return kind;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]