[gnome-software] packagekit: Only define refine(), not refine_app()
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] packagekit: Only define refine(), not refine_app()
- Date: Wed, 22 Apr 2020 12:03:43 +0000 (UTC)
commit fd7aceaa10ae3a5403c0a64f2a276e57a454dd57
Author: Philip Withnall <withnall endlessm com>
Date: Wed Apr 8 13:53:47 2020 +0100
packagekit: Only define refine(), not refine_app()
See the previous commit for details.
Signed-off-by: Philip Withnall <withnall endlessm com>
plugins/packagekit/gs-plugin-packagekit-refine.c | 30 ++++++++++--------------
1 file changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit-refine.c
b/plugins/packagekit/gs-plugin-packagekit-refine.c
index 1da3cc16..0de1a877 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refine.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refine.c
@@ -794,26 +794,20 @@ gs_plugin_refine (GsPlugin *plugin,
if (!gs_plugin_packagekit_refine_update_urgency (plugin, list, flags, cancellable, error))
return FALSE;
- /* success */
- return TRUE;
-}
+ for (guint i = 0; i < gs_app_list_length (list); i++) {
+ GsApp *app = gs_app_list_index (list, i);
-gboolean
-gs_plugin_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), "packagekit") != 0)
- return TRUE;
+ /* only process this app if was created by this plugin */
+ if (g_strcmp0 (gs_app_get_management_plugin (app), "packagekit") != 0)
+ continue;
- /* the scope is always system-wide */
- if (gs_app_get_scope (app) == AS_APP_SCOPE_UNKNOWN)
- gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
- if (gs_app_get_bundle_kind (app) == AS_BUNDLE_KIND_UNKNOWN)
- gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
+ /* the scope is always system-wide */
+ if (gs_app_get_scope (app) == AS_APP_SCOPE_UNKNOWN)
+ gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
+ if (gs_app_get_bundle_kind (app) == AS_BUNDLE_KIND_UNKNOWN)
+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
+ }
+ /* success */
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]