[gnome-software/wip/jrocha/fix-updates-list: 2/3] Filter apps that are not updatable from the updates list
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/jrocha/fix-updates-list: 2/3] Filter apps that are not updatable from the updates list
- Date: Wed, 19 Oct 2016 09:39:37 +0000 (UTC)
commit e76d1c823d2031b6e8dfc91d0f60a7a622a5eb71
Author: Joaquim Rocha <jrocha endlessm com>
Date: Tue Oct 18 18:20:29 2016 +0200
Filter apps that are not updatable from the updates list
When the list of updates is gathered and filtered, it should also
check for apps that are not in an updatable state.
src/gs-plugin-loader.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 0342ef0..bbcd4e0 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -993,6 +993,13 @@ gs_plugin_loader_app_is_valid (GsApp *app, gpointer user_data)
}
static gboolean
+gs_plugin_loader_app_is_valid_updatable (GsApp *app, gpointer user_data)
+{
+ return gs_plugin_loader_app_is_valid (app, user_data) &&
+ gs_app_is_updatable (app);
+}
+
+static gboolean
gs_plugin_loader_filter_qt_for_gtk (GsApp *app, gpointer user_data)
{
/* hide the QT versions in preference to the GTK ones */
@@ -1266,9 +1273,9 @@ gs_plugin_loader_get_updates_thread_cb (GTask *task,
return;
}
- /* remove any packages that are not proper applications or
- * OS updates */
- gs_app_list_filter (state->list, gs_plugin_loader_app_is_valid, state);
+ /* remove any apps that are not proper applications or OS updates */
+ gs_app_list_filter (state->list,
+ gs_plugin_loader_app_is_valid_updatable, state);
/* filter duplicates with priority */
gs_app_list_filter (state->list, gs_plugin_loader_app_set_prio, plugin_loader);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]