[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 280/331] Rely on AsStore to detect cache changes



commit f7b398662909256a29a9d53f1d76665575047603
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 cad567f..a06dfbb 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 8d3dfe5..103fc3e 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -67,22 +67,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]