[gnome-software] trivial: Use the new features in appstream-glib to correctly get the desktop file
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Use the new features in appstream-glib to correctly get the desktop file
- Date: Mon, 27 Feb 2017 11:57:47 +0000 (UTC)
commit 88c020842df71eeb023bde82fa9d2fdc7aa3b6b2
Author: Richard Hughes <richard hughsie com>
Date: Mon Feb 27 10:09:53 2017 +0000
trivial: Use the new features in appstream-glib to correctly get the desktop file
src/plugins/gs-appstream.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-appstream.c b/src/plugins/gs-appstream.c
index 3a548f9..673f626 100644
--- a/src/plugins/gs-appstream.c
+++ b/src/plugins/gs-appstream.c
@@ -608,8 +608,16 @@ gs_appstream_refine_app (GsPlugin *plugin,
/* set source */
if (gs_app_get_metadata_item (app, "appstream::source-file") == NULL) {
+#if AS_CHECK_VERSION(0,6,9)
+ AsFormat *format = as_app_get_format_by_kind (item, AS_FORMAT_KIND_DESKTOP);
+ if (format != NULL) {
+ gs_app_set_metadata (app, "appstream::source-file",
+ as_format_get_filename (format));
+ }
+#else
gs_app_set_metadata (app, "appstream::source-file",
as_app_get_source_file (item));
+#endif
}
/* scope */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]