[gnome-software: 9/11] gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_DISTRO_UPDATES
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 9/11] gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_DISTRO_UPDATES
- Date: Fri, 4 Mar 2022 06:30:50 +0000 (UTC)
commit b52c6934bf1ed86047a375b0ab9f8bfb588ede2c
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed Mar 2 16:37:46 2022 +0000
gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_DISTRO_UPDATES
It’s no longer used.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1472
lib/gs-plugin-loader.c | 17 +----------------
lib/gs-plugin-types.h | 2 --
lib/gs-plugin-vfuncs.h | 20 --------------------
lib/gs-plugin.c | 6 ------
4 files changed, 1 insertion(+), 44 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 792390d61..78a0eb1cc 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -662,7 +662,6 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
break;
case GS_PLUGIN_ACTION_GET_UPDATES:
case GS_PLUGIN_ACTION_GET_UPDATES_HISTORICAL:
- case GS_PLUGIN_ACTION_GET_DISTRO_UPDATES:
case GS_PLUGIN_ACTION_GET_SOURCES:
case GS_PLUGIN_ACTION_GET_POPULAR:
case GS_PLUGIN_ACTION_GET_FEATURED:
@@ -1149,13 +1148,6 @@ gs_plugin_loader_app_sort_prio_cb (GsApp *app1, GsApp *app2, gpointer user_data)
return gs_app_compare_priority (app1, app2);
}
-static gint
-gs_plugin_loader_app_sort_version_cb (GsApp *app1, GsApp *app2, gpointer user_data)
-{
- return as_vercmp_simple (gs_app_get_version (app1),
- gs_app_get_version (app2));
-}
-
/******************************************************************************/
/**
@@ -3752,8 +3744,7 @@ gs_plugin_loader_job_process_async (GsPluginLoader *plugin_loader,
}
/* FIXME: this is probably a bug */
- if (action == GS_PLUGIN_ACTION_GET_DISTRO_UPDATES ||
- action == GS_PLUGIN_ACTION_GET_SOURCES) {
+ if (action == GS_PLUGIN_ACTION_GET_SOURCES) {
gs_plugin_job_add_refine_flags (plugin_job,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION);
}
@@ -3812,12 +3803,6 @@ gs_plugin_loader_job_process_async (GsPluginLoader *plugin_loader,
gs_plugin_loader_app_sort_prio_cb, NULL);
}
break;
- case GS_PLUGIN_ACTION_GET_DISTRO_UPDATES:
- if (gs_plugin_job_get_sort_func (plugin_job, NULL) == NULL) {
- gs_plugin_job_set_sort_func (plugin_job,
- gs_plugin_loader_app_sort_version_cb, NULL);
- }
- break;
default:
break;
}
diff --git a/lib/gs-plugin-types.h b/lib/gs-plugin-types.h
index 05380218b..b7ff2e954 100644
--- a/lib/gs-plugin-types.h
+++ b/lib/gs-plugin-types.h
@@ -228,7 +228,6 @@ typedef enum {
* @GS_PLUGIN_ACTION_LAUNCH: Launch an application
* @GS_PLUGIN_ACTION_UPDATE_CANCEL: Cancel the update
* @GS_PLUGIN_ACTION_GET_UPDATES: Get the list of updates
- * @GS_PLUGIN_ACTION_GET_DISTRO_UPDATES: Get the list of distro 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
@@ -261,7 +260,6 @@ typedef enum {
GS_PLUGIN_ACTION_LAUNCH,
GS_PLUGIN_ACTION_UPDATE_CANCEL,
GS_PLUGIN_ACTION_GET_UPDATES,
- GS_PLUGIN_ACTION_GET_DISTRO_UPDATES,
GS_PLUGIN_ACTION_GET_SOURCES,
GS_PLUGIN_ACTION_GET_POPULAR,
GS_PLUGIN_ACTION_GET_FEATURED,
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 918b93890..83364376c 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -167,26 +167,6 @@ gboolean gs_plugin_add_updates (GsPlugin *plugin,
GCancellable *cancellable,
GError **error);
-/**
- * gs_plugin_add_distro_upgrades:
- * @plugin: a #GsPlugin
- * @list: a #GsAppList
- * @cancellable: a #GCancellable, or %NULL
- * @error: a #GError, or %NULL
- *
- * Get the list of distribution upgrades. Due to the download size, these
- * should not be downloaded until the user has explicitly opted-in.
- *
- * Plugins are expected to add new apps using gs_app_list_add() of type
- * %AS_COMPONENT_KIND_OPERATING_SYSTEM.
- *
- * Returns: %TRUE for success or if not relevant
- **/
-gboolean gs_plugin_add_distro_upgrades (GsPlugin *plugin,
- GsAppList *list,
- GCancellable *cancellable,
- GError **error);
-
/**
* gs_plugin_add_sources:
* @plugin: a #GsPlugin
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index 23e136d8b..b34bbd8dc 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1426,8 +1426,6 @@ gs_plugin_action_to_function_name (GsPluginAction action)
return "gs_plugin_file_to_app";
if (action == GS_PLUGIN_ACTION_URL_TO_APP)
return "gs_plugin_url_to_app";
- if (action == GS_PLUGIN_ACTION_GET_DISTRO_UPDATES)
- return "gs_plugin_add_distro_upgrades";
if (action == GS_PLUGIN_ACTION_GET_SOURCES)
return "gs_plugin_add_sources";
if (action == GS_PLUGIN_ACTION_GET_FEATURED)
@@ -1496,8 +1494,6 @@ gs_plugin_action_to_string (GsPluginAction action)
return "update-cancel";
if (action == GS_PLUGIN_ACTION_GET_UPDATES)
return "get-updates";
- if (action == GS_PLUGIN_ACTION_GET_DISTRO_UPDATES)
- return "get-distro-updates";
if (action == GS_PLUGIN_ACTION_GET_SOURCES)
return "get-sources";
if (action == GS_PLUGIN_ACTION_GET_POPULAR)
@@ -1568,8 +1564,6 @@ gs_plugin_action_from_string (const gchar *action)
return GS_PLUGIN_ACTION_UPDATE_CANCEL;
if (g_strcmp0 (action, "get-updates") == 0)
return GS_PLUGIN_ACTION_GET_UPDATES;
- if (g_strcmp0 (action, "get-distro-updates") == 0)
- return GS_PLUGIN_ACTION_GET_DISTRO_UPDATES;
if (g_strcmp0 (action, "get-sources") == 0)
return GS_PLUGIN_ACTION_GET_SOURCES;
if (g_strcmp0 (action, "get-popular") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]