[gnome-software/wip/rancell/snapd-glib: 6/6] Fix small things



commit 9df0ea4b554ffce462ea4db01952f9397f5bb037
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Feb 3 09:13:15 2017 +1300

    Fix small things

 configure.ac                 |    2 +-
 src/plugins/gs-plugin-snap.c |    8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 57a12c2..fda22b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -419,7 +419,7 @@ AC_ARG_ENABLE(snap,
               enable_snap=maybe)
 AS_IF([test "x$enable_snap" != "xno"], [
     PKG_CHECK_MODULES(SNAP,
-                      [snapd-glib],
+                      [snapd-glib >= 1.6],
                       [have_snap=yes],
                       [have_snap=no])
 ], [
diff --git a/src/plugins/gs-plugin-snap.c b/src/plugins/gs-plugin-snap.c
index 03c517a..6111f5c 100644
--- a/src/plugins/gs-plugin-snap.c
+++ b/src/plugins/gs-plugin-snap.c
@@ -35,12 +35,6 @@ gs_plugin_initialize (GsPlugin *plugin)
 {
        GsPluginData *priv = gs_plugin_alloc_data (plugin, sizeof(GsPluginData));
 
-       if (!gs_snapd_exists ()) {
-               g_debug ("disabling '%s' as snapd not running",
-                        gs_plugin_get_name (plugin));
-               gs_plugin_set_enabled (plugin, FALSE);
-       }
-
        priv->auth = gs_auth_new ("snapd");
        gs_auth_set_provider_name (priv->auth, "Snap Store");
        gs_auth_set_provider_schema (priv->auth, "com.ubuntu.UbuntuOne.GnomeSoftware");
@@ -195,7 +189,7 @@ refine_app (GsPlugin *plugin, GsApp *app, SnapdSnap *snap, gboolean from_search,
        }
 
        screenshots = snapd_snap_get_screenshots (snap);
-       if (screenshots != NULL && gs_app_get_screenshots (app)->len <= 0) {
+       if (screenshots != NULL && screenshots->len > 0) {
                guint i;
 
                for (i = 0; i < screenshots->len; i++) {


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