[gnome-software] trivial: Fix compile with newer versions of appstream-glib
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Fix compile with newer versions of appstream-glib
- Date: Mon, 18 Aug 2014 10:01:28 +0000 (UTC)
commit 0c2d36ad0089a7e9f4ad39ecd3cdfaece4e067dd
Author: Richard Hughes <richard hughsie com>
Date: Mon Aug 18 11:00:00 2014 +0100
trivial: Fix compile with newer versions of appstream-glib
src/plugins/gs-plugin-appstream.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 56a77cb..06a0419 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -473,11 +473,19 @@ gs_plugin_refine_item (GsPlugin *plugin,
gs_plugin_appstream_set_license (app, as_app_get_project_license (item));
/* set keywords */
+#if AS_CHECK_VERSION(0,3,0)
+ if (as_app_get_keywords (item, NULL) != NULL &&
+ gs_app_get_keywords (app) == NULL) {
+ gs_app_set_keywords (app, as_app_get_keywords (item, NULL));
+ gs_app_add_kudo (app, GS_APP_KUDO_HAS_KEYWORDS);
+ }
+#else
if (as_app_get_keywords (item) != NULL &&
gs_app_get_keywords (app) == NULL) {
gs_app_set_keywords (app, as_app_get_keywords (item));
gs_app_add_kudo (app, GS_APP_KUDO_HAS_KEYWORDS);
}
+#endif
/* set description */
tmp = as_app_get_description (item, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]