[gnome-software/wip/kalev/gnome-3-22: 90/96] trivial: Do not use deprecated symbols from appstream-glib



commit 380c10ee32a5b6f5596104e9db08fb75cb342e1b
Author: Richard Hughes <richard hughsie com>
Date:   Mon Feb 27 10:10:15 2017 +0000

    trivial: Do not use deprecated symbols from appstream-glib

 src/plugins/gs-flatpak.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index d51a566..1e4ff56 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -317,8 +317,17 @@ gs_flatpak_rescan_installed (GsFlatpak *self,
                /* add */
                as_app_set_state (app, AS_APP_STATE_INSTALLED);
                as_app_set_scope (app, self->scope);
+#if AS_CHECK_VERSION(0,6,9)
+{
+               g_autoptr(AsFormat) format = as_format_new ();
+               as_format_set_kind (format, AS_FORMAT_KIND_DESKTOP);
+               as_format_set_filename (format, fn_desktop);
+               as_app_add_format (app, format);
+}
+#else
                as_app_set_source_kind (app, AS_APP_SOURCE_KIND_DESKTOP);
                as_app_set_source_file (app, fn_desktop);
+#endif
                as_app_set_icon_path (app, path_exports);
                as_app_add_keyword (app, NULL, "flatpak");
                as_store_add_app (self->store, app);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]