[gnome-software: 7/8] gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_FEATURED
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 7/8] gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_FEATURED
- Date: Mon, 23 May 2022 15:55:35 +0000 (UTC)
commit a2475349cf488c4313292809479867f1e6cbcf42
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon May 23 14:13:20 2022 +0100
gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_FEATURED
It’s no longer used. The `GsAppQuery:is-featured` 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 | 6 ------
lib/gs-plugin-types.h | 2 --
lib/gs-plugin-vfuncs.h | 27 ---------------------------
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 856a9e683..c15201ef7 100644
--- a/doc/vendor-customisation.md
+++ b/doc/vendor-customisation.md
@@ -96,8 +96,8 @@ sections:
`component/custom/value[@key='GnomeSoftware::FeatureTile-css]` set in their
metainfo. They are also required to have a high-resolution icon, and the set
of applications shown in the carousel is randomised and limited to (for
- example) 5. Technically these are the results of the
- `gs_plugin_add_featured()` vfunc.
+ example) 5. Technically these are the results of a
+ `GsPlugin.list_apps_async()` query with `GsAppQuery:is-featured` set.
* “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 a `GsPlugin.list_apps_async()`
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 4ccca4659..9f07e008f 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -645,7 +645,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_FEATURED:
{
GsPluginResultsFunc plugin_func = func;
ret = plugin_func (plugin, list, cancellable, &error_local);
@@ -3563,10 +3562,6 @@ gs_plugin_loader_process_thread_cb (GTask *task,
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;
- case GS_PLUGIN_ACTION_GET_FEATURED:
- gs_app_list_filter (list, gs_plugin_loader_app_is_valid_filter, helper);
- gs_app_list_filter (list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
- break;
case GS_PLUGIN_ACTION_GET_UPDATES:
gs_app_list_filter (list, gs_plugin_loader_app_is_valid_updatable, helper);
break;
@@ -4068,7 +4063,6 @@ job_process_cb (GTask *task)
/* set up a hang handler */
switch (action) {
case GS_PLUGIN_ACTION_GET_ALTERNATES:
- case GS_PLUGIN_ACTION_GET_FEATURED:
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 137e6501f..81bcbcd00 100644
--- a/lib/gs-plugin-types.h
+++ b/lib/gs-plugin-types.h
@@ -243,7 +243,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_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
* @GS_PLUGIN_ACTION_GET_CATEGORIES: Get the list of categories
@@ -271,7 +270,6 @@ typedef enum {
GS_PLUGIN_ACTION_UPDATE_CANCEL,
GS_PLUGIN_ACTION_GET_UPDATES,
GS_PLUGIN_ACTION_GET_SOURCES,
- GS_PLUGIN_ACTION_GET_FEATURED,
GS_PLUGIN_ACTION_SEARCH,
GS_PLUGIN_ACTION_SEARCH_PROVIDES,
GS_PLUGIN_ACTION_GET_CATEGORIES,
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 6623de496..3801b0ba0 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -203,33 +203,6 @@ gboolean gs_plugin_add_categories (GsPlugin *plugin,
GCancellable *cancellable,
GError **error);
-/**
- * gs_plugin_add_featured:
- * @plugin: a #GsPlugin
- * @list: a #GsAppList
- * @cancellable: a #GCancellable, or %NULL
- * @error: a #GError, or %NULL
- *
- * Get applications that should be featured as a large full-width banner on the
- * overview page.
- * This is expected to be a curated list of applications that are high quality
- * and feature-complete.
- *
- * The returned list of popular applications are randomized in a way so that
- * the same application is featured for the entire calendar day.
- *
- * NOTE: The UI code may expect that applications have additional metadata set on
- * results, for instance <code>GnomeSoftware::FeatureTile</code>.
- *
- * Plugins are expected to add new apps using gs_app_list_add().
- *
- * Returns: %TRUE for success or if not relevant
- **/
-gboolean gs_plugin_add_featured (GsPlugin *plugin,
- GsAppList *list,
- GCancellable *cancellable,
- GError **error);
-
/**
* gs_plugin_launch:
* @plugin: a #GsPlugin
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index 77c59ce4c..6e87814ae 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1457,8 +1457,6 @@ gs_plugin_action_to_function_name (GsPluginAction action)
return "gs_plugin_url_to_app";
if (action == GS_PLUGIN_ACTION_GET_SOURCES)
return "gs_plugin_add_sources";
- if (action == GS_PLUGIN_ACTION_GET_FEATURED)
- return "gs_plugin_add_featured";
if (action == GS_PLUGIN_ACTION_GET_UPDATES_HISTORICAL)
return "gs_plugin_add_updates_historical";
if (action == GS_PLUGIN_ACTION_GET_UPDATES)
@@ -1517,8 +1515,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_FEATURED)
- return "get-featured";
if (action == GS_PLUGIN_ACTION_SEARCH)
return "search";
if (action == GS_PLUGIN_ACTION_SEARCH_PROVIDES)
@@ -1579,8 +1575,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-featured") == 0)
- return GS_PLUGIN_ACTION_GET_FEATURED;
if (g_strcmp0 (action, "search") == 0)
return GS_PLUGIN_ACTION_SEARCH;
if (g_strcmp0 (action, "search-provides") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]