[gnome-software/gnome-3-26] snap: Don't use deprecated snapd-glib method if have suitably new version of lib



commit e41e11399949cd277ec6ca76b70c5805f7cd2e24
Author: Robert Ancell <robert ancell canonical com>
Date:   Mon Oct 30 16:01:11 2017 +1300

    snap: Don't use deprecated snapd-glib method if have suitably new version of lib

 plugins/snap/gs-plugin-snap.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index f898560..d3bf3ee 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -44,8 +44,10 @@ get_client (GsPlugin *plugin, GError **error)
 
        client = snapd_client_new ();
        snapd_client_set_allow_interaction (client, TRUE);
+#ifndef SNAPD_GLIB_VERSION_1_24
        if (!snapd_client_connect_sync (client, NULL, error))
                return NULL;
+#endif
        old_user_agent = snapd_client_get_user_agent (client);
        user_agent = g_strdup_printf ("%s %s", gs_user_agent (), old_user_agent);
        snapd_client_set_user_agent (client, user_agent);


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