[gnome-software] packagekit refresh: Add a dummy app to marshal refresh progress



commit fb4cd2d6c7544715c80ff1bd4abe40471554f73a
Author: Kalev Lember <klember redhat com>
Date:   Thu Jan 25 21:43:13 2018 +0100

    packagekit refresh: Add a dummy app to marshal refresh progress
    
    This makes the progress bar in the loading page do something useful,
    instead of just sitting still at 0%.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/issues/100

 plugins/packagekit/gs-plugin-packagekit-refresh.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit-refresh.c 
b/plugins/packagekit/gs-plugin-packagekit-refresh.c
index ec4b2611..aaaa0a30 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refresh.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refresh.c
@@ -64,6 +64,7 @@ gs_plugin_refresh (GsPlugin *plugin,
 {
        GsPluginData *priv = gs_plugin_get_data (plugin);
        ProgressData data = { 0 };
+       g_autoptr(GsApp) app_dl = gs_app_new (gs_plugin_get_name (plugin));
        g_autoptr(PkResults) results = NULL;
 
        /* nothing to re-generate */
@@ -73,6 +74,7 @@ gs_plugin_refresh (GsPlugin *plugin,
        /* cache age of 0 is user-initiated */
        pk_client_set_background (PK_CLIENT (priv->task), cache_age > 0);
 
+       data.app = app_dl;
        data.plugin = plugin;
 
        /* refresh the metadata */


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