[gnome-software] flatpak: Only define refine(), not refine_app()



commit 377cd1eb253aa65d28545722e8ab9c5ad52e4df2
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Apr 8 13:51:56 2020 +0100

    flatpak: Only define refine(), not refine_app()
    
    See the previous commit for rationale.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 plugins/flatpak/gs-plugin-flatpak.c | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)
---
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index faf52c96..0a229f81 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -306,12 +306,12 @@ gs_plugin_flatpak_refine_app (GsPlugin *plugin,
 }
 
 
-gboolean
-gs_plugin_refine_app (GsPlugin *plugin,
-                     GsApp *app,
-                     GsPluginRefineFlags flags,
-                     GCancellable *cancellable,
-                     GError **error)
+static gboolean
+refine_app (GsPlugin             *plugin,
+           GsApp                *app,
+           GsPluginRefineFlags   flags,
+           GCancellable         *cancellable,
+           GError              **error)
 {
        /* only process this app if was created by this plugin */
        if (g_strcmp0 (gs_app_get_management_plugin (app),
@@ -338,6 +338,22 @@ gs_plugin_refine_app (GsPlugin *plugin,
        return TRUE;
 }
 
+gboolean
+gs_plugin_refine (GsPlugin             *plugin,
+                 GsAppList            *list,
+                 GsPluginRefineFlags   flags,
+                 GCancellable         *cancellable,
+                 GError              **error)
+{
+       for (guint i = 0; i < gs_app_list_length (list); i++) {
+               GsApp *app = gs_app_list_index (list, i);
+               if (!refine_app (plugin, app, flags, cancellable, error))
+                       return FALSE;
+       }
+
+       return TRUE;
+}
+
 gboolean
 gs_plugin_refine_wildcard (GsPlugin *plugin,
                           GsApp *app,


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