[gnome-software: 11/15] gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_POPULAR
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 11/15] gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_POPULAR
- Date: Mon, 9 May 2022 13:09:05 +0000 (UTC)
commit 7d54958d4e46e27af2cbdfc7f529611f4709d7fe
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue May 3 16:54:38 2022 +0100
gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_POPULAR
It’s no longer used. The `GsAppQuery:is-curated` query property is used
instead.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1472
doc/vendor-customisation.md | 4 ++--
lib/gs-plugin-loader.c | 7 -------
lib/gs-plugin-types.h | 2 --
lib/gs-plugin-vfuncs.h | 26 --------------------------
lib/gs-plugin.c | 6 ------
5 files changed, 2 insertions(+), 43 deletions(-)
---
diff --git a/doc/vendor-customisation.md b/doc/vendor-customisation.md
index d7a7ba4b4..816353990 100644
--- a/doc/vendor-customisation.md
+++ b/doc/vendor-customisation.md
@@ -100,8 +100,8 @@ sections:
`gs_plugin_add_featured()` vfunc.
* “Editor’s Choice” on the overview page: Applications are included if they
have `component/kudos/kudo[text()='GnomeSoftware::popular']` set in their
- metainfo. Technically these are the results of the `gs_plugin_add_popular()`
- vfunc.
+ metainfo. Technically these are the results of a `GsPlugin.list_apps_async()`
+ query with `GsAppQuery:is-curated` set.
* Carousel on the category page: Applications are included if they are in the
`Featured` subcategory of the displayed category. They are also required to
have a high-resolution icon, and the set of applications shown in the carousel
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 00b776477..2016f7621 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -651,7 +651,6 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
case GS_PLUGIN_ACTION_GET_UPDATES:
case GS_PLUGIN_ACTION_GET_UPDATES_HISTORICAL:
case GS_PLUGIN_ACTION_GET_SOURCES:
- case GS_PLUGIN_ACTION_GET_POPULAR:
case GS_PLUGIN_ACTION_GET_FEATURED:
{
GsPluginResultsFunc plugin_func = func;
@@ -3604,11 +3603,6 @@ gs_plugin_loader_process_thread_cb (GTask *task,
case GS_PLUGIN_ACTION_GET_UPDATES:
gs_app_list_filter (list, gs_plugin_loader_app_is_valid_updatable, helper);
break;
- case GS_PLUGIN_ACTION_GET_POPULAR:
- gs_app_list_filter (list, gs_plugin_loader_app_is_valid_filter, helper);
- gs_app_list_filter (list, gs_plugin_loader_filter_qt_for_gtk, NULL);
- gs_app_list_filter (list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
- break;
default:
break;
}
@@ -4119,7 +4113,6 @@ job_process_cb (GTask *task)
case GS_PLUGIN_ACTION_GET_ALTERNATES:
case GS_PLUGIN_ACTION_GET_CATEGORY_APPS:
case GS_PLUGIN_ACTION_GET_FEATURED:
- case GS_PLUGIN_ACTION_GET_POPULAR:
case GS_PLUGIN_ACTION_SEARCH:
case GS_PLUGIN_ACTION_SEARCH_PROVIDES:
if (gs_plugin_job_get_timeout (plugin_job) > 0) {
diff --git a/lib/gs-plugin-types.h b/lib/gs-plugin-types.h
index fa02a7f76..42e9a1fb8 100644
--- a/lib/gs-plugin-types.h
+++ b/lib/gs-plugin-types.h
@@ -257,7 +257,6 @@ typedef enum {
* @GS_PLUGIN_ACTION_UPDATE_CANCEL: Cancel the update
* @GS_PLUGIN_ACTION_GET_UPDATES: Get the list of updates
* @GS_PLUGIN_ACTION_GET_SOURCES: Get the list of sources
- * @GS_PLUGIN_ACTION_GET_POPULAR: Get the list of popular applications
* @GS_PLUGIN_ACTION_GET_FEATURED: Get the list of featured applications
* @GS_PLUGIN_ACTION_SEARCH: Get the search results for a query
* @GS_PLUGIN_ACTION_SEARCH_PROVIDES: Get the search results for a provide query
@@ -287,7 +286,6 @@ typedef enum {
GS_PLUGIN_ACTION_UPDATE_CANCEL,
GS_PLUGIN_ACTION_GET_UPDATES,
GS_PLUGIN_ACTION_GET_SOURCES,
- GS_PLUGIN_ACTION_GET_POPULAR,
GS_PLUGIN_ACTION_GET_FEATURED,
GS_PLUGIN_ACTION_SEARCH,
GS_PLUGIN_ACTION_SEARCH_PROVIDES,
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 008ba7fe4..7469a044f 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -223,32 +223,6 @@ gboolean gs_plugin_add_category_apps (GsPlugin *plugin,
GCancellable *cancellable,
GError **error);
-/**
- * gs_plugin_add_popular:
- * @plugin: a #GsPlugin
- * @list: a #GsAppList
- * @cancellable: a #GCancellable, or %NULL
- * @error: a #GError, or %NULL
- *
- * Get popular applications that should be featured on the main page as
- * "Editors Picks".
- * This is expected to be a curated list of applications that are high quality
- * and feature-complete.
- *
- * The returned list of popular applications are not sorted, but each #GsApp has
- * to be valid, for instance having a known state and a valid icon.
- * If an insufficient number of applications are added by plugins then the
- * section on the overview shell may be hidden.
- *
- * Plugins are expected to add new apps using gs_app_list_add().
- *
- * Returns: %TRUE for success or if not relevant
- **/
-gboolean gs_plugin_add_popular (GsPlugin *plugin,
- GsAppList *list,
- GCancellable *cancellable,
- GError **error);
-
/**
* gs_plugin_add_featured:
* @plugin: a #GsPlugin
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index 4c491958e..14de6341a 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1463,8 +1463,6 @@ gs_plugin_action_to_function_name (GsPluginAction action)
return "gs_plugin_add_updates_historical";
if (action == GS_PLUGIN_ACTION_GET_UPDATES)
return "gs_plugin_add_updates";
- if (action == GS_PLUGIN_ACTION_GET_POPULAR)
- return "gs_plugin_add_popular";
if (action == GS_PLUGIN_ACTION_SEARCH)
return "gs_plugin_add_search";
if (action == GS_PLUGIN_ACTION_SEARCH_PROVIDES)
@@ -1521,8 +1519,6 @@ gs_plugin_action_to_string (GsPluginAction action)
return "get-updates";
if (action == GS_PLUGIN_ACTION_GET_SOURCES)
return "get-sources";
- if (action == GS_PLUGIN_ACTION_GET_POPULAR)
- return "get-popular";
if (action == GS_PLUGIN_ACTION_GET_FEATURED)
return "get-featured";
if (action == GS_PLUGIN_ACTION_SEARCH)
@@ -1587,8 +1583,6 @@ gs_plugin_action_from_string (const gchar *action)
return GS_PLUGIN_ACTION_GET_UPDATES;
if (g_strcmp0 (action, "get-sources") == 0)
return GS_PLUGIN_ACTION_GET_SOURCES;
- if (g_strcmp0 (action, "get-popular") == 0)
- return GS_PLUGIN_ACTION_GET_POPULAR;
if (g_strcmp0 (action, "get-featured") == 0)
return GS_PLUGIN_ACTION_GET_FEATURED;
if (g_strcmp0 (action, "search") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]