[gnome-software] plugin appstream: Correctly translate AsIdKind to GsAppIdKind
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] plugin appstream: Correctly translate AsIdKind to GsAppIdKind
- Date: Mon, 2 Jun 2014 12:03:50 +0000 (UTC)
commit a3096e202e346af9b50dbcb528104d6f190e7df3
Author: Kalev Lember <kalevlember gmail com>
Date: Mon Jun 2 13:49:32 2014 +0200
plugin appstream: Correctly translate AsIdKind to GsAppIdKind
src/plugins/gs-plugin-appstream.c | 30 ++++++++++++++++++++++++++++--
1 files changed, 28 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index b1021b7..2cd9e58 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -471,8 +471,34 @@ gs_plugin_refine_item (GsPlugin *plugin,
gs_app_set_kind (app, GS_APP_KIND_SYSTEM);
/* set id kind */
- if (gs_app_get_id_kind (app) == GS_APP_ID_KIND_UNKNOWN)
- gs_app_set_id_kind (app, as_app_get_id_kind (item));
+ if (gs_app_get_id_kind (app) == GS_APP_ID_KIND_UNKNOWN) {
+ switch (as_app_get_id_kind (item)) {
+ case AS_ID_KIND_UNKNOWN:
+ gs_app_set_id_kind (app, GS_APP_ID_KIND_UNKNOWN);
+ break;
+ case AS_ID_KIND_DESKTOP:
+ gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
+ break;
+ case AS_ID_KIND_FONT:
+ gs_app_set_id_kind (app, GS_APP_ID_KIND_FONT);
+ break;
+ case AS_ID_KIND_CODEC:
+ gs_app_set_id_kind (app, GS_APP_ID_KIND_CODEC);
+ break;
+ case AS_ID_KIND_INPUT_METHOD:
+ gs_app_set_id_kind (app, GS_APP_ID_KIND_INPUT_METHOD);
+ break;
+ case AS_ID_KIND_WEB_APP:
+ gs_app_set_id_kind (app, GS_APP_ID_KIND_WEBAPP);
+ break;
+ case AS_ID_KIND_SOURCE:
+ /* handled above */
+ break;
+ default:
+ g_warning ("Unhandled AsIdKind '%s'", as_id_kind_to_string (as_app_get_id_kind
(item)));
+ break;
+ }
+ }
/* set package names */
pkgnames = as_app_get_pkgnames (item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]