[gnome-software/wip/rancell/ubuntu-ratings-3-18: 2/19] Iterate through apps



commit b007e83078ba06b3ce3cfd73c76270faadcd949b
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Oct 6 13:34:22 2015 +1300

    Iterate through apps

 src/plugins/gs-plugin-ubuntu-ratings.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-ubuntu-ratings.c b/src/plugins/gs-plugin-ubuntu-ratings.c
index 066236c..c402cef 100644
--- a/src/plugins/gs-plugin-ubuntu-ratings.c
+++ b/src/plugins/gs-plugin-ubuntu-ratings.c
@@ -85,5 +85,16 @@ gs_plugin_refine (GsPlugin *plugin,
                  GCancellable *cancellable,
                  GError **error)
 {
-       return FALSE;
+       GList *l;
+       GsApp *app;
+
+       for (l = *list; l != NULL; l = l->next) {
+               app = GS_APP (l->data);
+               if (gs_app_get_id (app) == NULL)
+                       continue;
+               if (gs_app_get_rating (app) != -1)
+                       continue;
+       }
+
+       return TRUE;
 }


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