[gnome-software/wip/iainl/ubuntu-xenial] Rely on AsStore to detect cache changes



commit 062f0e624b5e193938dfd85076044c1bbbd1a1fb
Author: William Hua <william hua canonical com>
Date:   Tue Apr 19 14:43:28 2016 -0400

    Rely on AsStore to detect cache changes

 src/gs-application.c              |   21 ++-------------------
 src/plugins/gs-plugin-appstream.c |   16 ----------------
 2 files changed, 2 insertions(+), 35 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index fc07453..86b9071 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -243,23 +243,6 @@ gs_application_dbus_unregister (GApplication    *application,
 }
 
 static void
-refreshed_cb (GObject      *source_object,
-             GAsyncResult *res,
-             gpointer      user_data)
-{
-       GsPluginLoader *loader = GS_PLUGIN_LOADER (source_object);
-
-       if (gs_plugin_loader_refresh_finish (loader, res, NULL)) {
-               gs_plugin_loader_refresh_async (loader,
-                                               0,
-                                               GS_PLUGIN_REFRESH_FLAGS_UPDATES,
-                                               NULL,
-                                               NULL,
-                                               NULL);
-       }
-}
-
-static void
 start_refresh (GsApplication *app)
 {
        g_action_group_activate_action (G_ACTION_GROUP (app),
@@ -270,8 +253,8 @@ start_refresh (GsApplication *app)
                                        0,
                                        GS_PLUGIN_REFRESH_FLAGS_UPDATES,
                                        NULL,
-                                       refreshed_cb,
-                                       app);
+                                       NULL,
+                                       NULL);
 }
 
 #define APP_INFO_PATH "/var/lib/app-info"
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 5c5f258..95b1c30 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -69,22 +69,6 @@ gs_plugin_appstream_store_changed_cb (AsStore *store, GsPlugin *plugin)
        gs_plugin_updates_changed (plugin);
 }
 
-static gboolean gs_plugin_appstream_startup (GsPlugin *plugin, GError **error);
-
-gboolean
-gs_plugin_refresh (GsPlugin              *plugin,
-                  guint                  cache_age,
-                  GsPluginRefreshFlags   flags,
-                  GCancellable          *cancellable,
-                  GError               **error)
-{
-       plugin->priv->done_init = FALSE;
-       gs_plugin_appstream_startup (plugin, NULL);
-       gs_plugin_updates_changed (plugin);
-
-       return TRUE;
-}
-
 /**
  * gs_plugin_initialize:
  */


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