[gnome-software: 1/11] gs-appstream: Drop unused GsPlugin arguments from gs-appstream.c
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/11] gs-appstream: Drop unused GsPlugin arguments from gs-appstream.c
- Date: Thu, 10 Jun 2021 12:20:05 +0000 (UTC)
commit cc94854302c51e8fb502c5cb86c542aa5e603bdc
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed May 19 13:54:22 2021 +0100
gs-appstream: Drop unused GsPlugin arguments from gs-appstream.c
Signed-off-by: Philip Withnall <pwithnall endlessos org>
plugins/core/gs-appstream.c | 42 +++++++++++++++-----------------------
plugins/core/gs-appstream.h | 18 ++++++----------
plugins/core/gs-plugin-appstream.c | 14 ++++++-------
plugins/flatpak/gs-flatpak.c | 10 ++++-----
4 files changed, 34 insertions(+), 50 deletions(-)
---
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 441259916..cfaedf898 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -177,7 +177,7 @@ app_add_icon (GsApp *app,
}
static void
-gs_appstream_refine_icon (GsPlugin *plugin, GsApp *app, XbNode *component)
+gs_appstream_refine_icon (GsApp *app, XbNode *component)
{
g_autoptr(GError) local_error = NULL;
g_autoptr(GPtrArray) icons = NULL; /* (element-type XbNode) */
@@ -431,8 +431,7 @@ gs_appstream_copy_metadata (GsApp *app, XbNode *component, GError **error)
}
static gboolean
-gs_appstream_refine_app_updates (GsPlugin *plugin,
- GsApp *app,
+gs_appstream_refine_app_updates (GsApp *app,
XbSilo *silo,
XbNode *component,
GError **error)
@@ -664,8 +663,7 @@ gs_appstream_is_valid_project_group (const gchar *project_group)
}
static gboolean
-gs_appstream_refine_app_content_rating (GsPlugin *plugin,
- GsApp *app,
+gs_appstream_refine_app_content_rating (GsApp *app,
XbNode *content_rating,
GError **error)
{
@@ -713,8 +711,7 @@ gs_appstream_refine_app_content_rating (GsPlugin *plugin,
}
static gboolean
-gs_appstream_refine_app_content_ratings (GsPlugin *plugin,
- GsApp *app,
+gs_appstream_refine_app_content_ratings (GsApp *app,
XbNode *component,
GError **error)
{
@@ -733,7 +730,7 @@ gs_appstream_refine_app_content_ratings (GsPlugin *plugin,
}
for (guint i = 0; i < content_ratings->len; i++) {
XbNode *content_rating = g_ptr_array_index (content_ratings, i);
- if (!gs_appstream_refine_app_content_rating (plugin, app, content_rating, error))
+ if (!gs_appstream_refine_app_content_rating (app, content_rating, error))
return FALSE;
}
return TRUE;
@@ -830,7 +827,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
/* set content rating */
if (TRUE) {
- if (!gs_appstream_refine_app_content_ratings (plugin, app, component, error))
+ if (!gs_appstream_refine_app_content_ratings (app, component, error))
return FALSE;
}
@@ -901,7 +898,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
/* set icon */
if ((refine_flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON) > 0 &&
gs_app_get_icons (app) == NULL)
- gs_appstream_refine_icon (plugin, app, component);
+ gs_appstream_refine_icon (app, component);
/* set categories */
if (refine_flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_CATEGORIES) {
@@ -1088,8 +1085,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
/* is there any update information */
if (refine_flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPDATE_DETAILS) {
- if (!gs_appstream_refine_app_updates (plugin,
- app,
+ if (!gs_appstream_refine_app_updates (app,
silo,
component,
error))
@@ -1222,8 +1218,7 @@ gs_appstream_search (GsPlugin *plugin,
}
gboolean
-gs_appstream_add_category_apps (GsPlugin *plugin,
- XbSilo *silo,
+gs_appstream_add_category_apps (XbSilo *silo,
GsCategory *category,
GsAppList *list,
GCancellable *cancellable,
@@ -1281,7 +1276,8 @@ gs_appstream_add_category_apps (GsPlugin *plugin,
}
static guint
-gs_appstream_count_component_for_groups (GsPlugin *plugin, XbSilo *silo, const gchar *desktop_group)
+gs_appstream_count_component_for_groups (XbSilo *silo,
+ const gchar *desktop_group)
{
guint limit = 10;
g_autofree gchar *xpath = NULL;
@@ -1317,8 +1313,7 @@ gs_appstream_count_component_for_groups (GsPlugin *plugin, XbSilo *silo, const g
/* we're not actually adding categories here, we're just setting the number of
* applications available in each category */
gboolean
-gs_appstream_add_categories (GsPlugin *plugin,
- XbSilo *silo,
+gs_appstream_add_categories (XbSilo *silo,
GPtrArray *list,
GCancellable *cancellable,
GError **error)
@@ -1332,7 +1327,7 @@ gs_appstream_add_categories (GsPlugin *plugin,
GPtrArray *groups = gs_category_get_desktop_groups (cat);
for (guint k = 0; k < groups->len; k++) {
const gchar *group = g_ptr_array_index (groups, k);
- guint cnt = gs_appstream_count_component_for_groups (plugin, silo, group);
+ guint cnt = gs_appstream_count_component_for_groups (silo, group);
for (guint l = 0; l < cnt; l++) {
gs_category_increment_size (parent);
if (children->len > 1) {
@@ -1349,8 +1344,7 @@ gs_appstream_add_categories (GsPlugin *plugin,
}
gboolean
-gs_appstream_add_popular (GsPlugin *plugin,
- XbSilo *silo,
+gs_appstream_add_popular (XbSilo *silo,
GsAppList *list,
GCancellable *cancellable,
GError **error)
@@ -1421,8 +1415,7 @@ gs_appstream_add_recent (GsPlugin *plugin,
}
gboolean
-gs_appstream_add_alternates (GsPlugin *plugin,
- XbSilo *silo,
+gs_appstream_add_alternates (XbSilo *silo,
GsApp *app,
GsAppList *list,
GCancellable *cancellable,
@@ -1484,8 +1477,7 @@ gs_appstream_add_alternates (GsPlugin *plugin,
}
gboolean
-gs_appstream_add_featured (GsPlugin *plugin,
- XbSilo *silo,
+gs_appstream_add_featured (XbSilo *silo,
GsAppList *list,
GCancellable *cancellable,
GError **error)
@@ -1594,7 +1586,7 @@ gs_appstream_component_add_icon (XbBuilderNode *component, const gchar *str)
}
void
-gs_appstream_component_add_extra_info (GsPlugin *plugin, XbBuilderNode *component)
+gs_appstream_component_add_extra_info (XbBuilderNode *component)
{
const gchar *kind = xb_builder_node_get_attr (component, "type");
diff --git a/plugins/core/gs-appstream.h b/plugins/core/gs-appstream.h
index d6e9a0be1..126410c70 100644
--- a/plugins/core/gs-appstream.h
+++ b/plugins/core/gs-appstream.h
@@ -29,29 +29,24 @@ gboolean gs_appstream_search (GsPlugin *plugin,
GsAppList *list,
GCancellable *cancellable,
GError **error);
-gboolean gs_appstream_add_categories (GsPlugin *plugin,
- XbSilo *silo,
+gboolean gs_appstream_add_categories (XbSilo *silo,
GPtrArray *list,
GCancellable *cancellable,
GError **error);
-gboolean gs_appstream_add_category_apps (GsPlugin *plugin,
- XbSilo *silo,
+gboolean gs_appstream_add_category_apps (XbSilo *silo,
GsCategory *category,
GsAppList *list,
GCancellable *cancellable,
GError **error);
-gboolean gs_appstream_add_popular (GsPlugin *plugin,
- XbSilo *silo,
+gboolean gs_appstream_add_popular (XbSilo *silo,
GsAppList *list,
GCancellable *cancellable,
GError **error);
-gboolean gs_appstream_add_featured (GsPlugin *plugin,
- XbSilo *silo,
+gboolean gs_appstream_add_featured (XbSilo *silo,
GsAppList *list,
GCancellable *cancellable,
GError **error);
-gboolean gs_appstream_add_alternates (GsPlugin *plugin,
- XbSilo *silo,
+gboolean gs_appstream_add_alternates (XbSilo *silo,
GsApp *app,
GsAppList *list,
GCancellable *cancellable,
@@ -62,8 +57,7 @@ gboolean gs_appstream_add_recent (GsPlugin *plugin,
guint64 age,
GCancellable *cancellable,
GError **error);
-void gs_appstream_component_add_extra_info (GsPlugin *plugin,
- XbBuilderNode *component);
+void gs_appstream_component_add_extra_info (XbBuilderNode *component);
void gs_appstream_component_add_keyword (XbBuilderNode *component,
const gchar *str);
void gs_appstream_component_add_category (XbBuilderNode *component,
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index 000509421..121c9b7c7 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -107,10 +107,9 @@ gs_plugin_appstream_add_icons_cb (XbBuilderFixup *self,
gpointer user_data,
GError **error)
{
- GsPlugin *plugin = GS_PLUGIN (user_data);
if (g_strcmp0 (xb_builder_node_get_element (bn), "component") != 0)
return TRUE;
- gs_appstream_component_add_extra_info (plugin, bn);
+ gs_appstream_component_add_extra_info (bn);
return TRUE;
}
@@ -1012,8 +1011,7 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
return FALSE;
locker = g_rw_lock_reader_locker_new (&priv->silo_lock);
- return gs_appstream_add_category_apps (plugin,
- priv->silo,
+ return gs_appstream_add_category_apps (priv->silo,
category,
list,
cancellable,
@@ -1087,7 +1085,7 @@ gs_plugin_add_categories (GsPlugin *plugin,
return FALSE;
locker = g_rw_lock_reader_locker_new (&priv->silo_lock);
- return gs_appstream_add_categories (plugin, priv->silo, list,
+ return gs_appstream_add_categories (priv->silo, list,
cancellable, error);
}
@@ -1104,7 +1102,7 @@ gs_plugin_add_popular (GsPlugin *plugin,
return FALSE;
locker = g_rw_lock_reader_locker_new (&priv->silo_lock);
- return gs_appstream_add_popular (plugin, priv->silo, list, cancellable, error);
+ return gs_appstream_add_popular (priv->silo, list, cancellable, error);
}
gboolean
@@ -1120,7 +1118,7 @@ gs_plugin_add_featured (GsPlugin *plugin,
return FALSE;
locker = g_rw_lock_reader_locker_new (&priv->silo_lock);
- return gs_appstream_add_featured (plugin, priv->silo, list, cancellable, error);
+ return gs_appstream_add_featured (priv->silo, list, cancellable, error);
}
gboolean
@@ -1155,7 +1153,7 @@ gs_plugin_add_alternates (GsPlugin *plugin,
return FALSE;
locker = g_rw_lock_reader_locker_new (&priv->silo_lock);
- return gs_appstream_add_alternates (plugin, priv->silo, app, list,
+ return gs_appstream_add_alternates (priv->silo, app, list,
cancellable, error);
}
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 8d73055ee..ce6a6615d 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -3580,7 +3580,7 @@ gs_flatpak_add_category_apps (GsFlatpak *self,
return FALSE;
locker = g_rw_lock_reader_locker_new (&self->silo_lock);
- return gs_appstream_add_category_apps (self->plugin, self->silo,
+ return gs_appstream_add_category_apps (self->silo,
category, list,
cancellable, error);
}
@@ -3597,7 +3597,7 @@ gs_flatpak_add_categories (GsFlatpak *self,
return FALSE;
locker = g_rw_lock_reader_locker_new (&self->silo_lock);
- return gs_appstream_add_categories (self->plugin, self->silo,
+ return gs_appstream_add_categories (self->silo,
list, cancellable, error);
}
@@ -3614,7 +3614,7 @@ gs_flatpak_add_popular (GsFlatpak *self,
return FALSE;
locker = g_rw_lock_reader_locker_new (&self->silo_lock);
- if (!gs_appstream_add_popular (self->plugin, self->silo, list_tmp,
+ if (!gs_appstream_add_popular (self->silo, list_tmp,
cancellable, error))
return FALSE;
@@ -3636,7 +3636,7 @@ gs_flatpak_add_featured (GsFlatpak *self,
return FALSE;
locker = g_rw_lock_reader_locker_new (&self->silo_lock);
- if (!gs_appstream_add_featured (self->plugin, self->silo, list_tmp,
+ if (!gs_appstream_add_featured (self->silo, list_tmp,
cancellable, error))
return FALSE;
@@ -3659,7 +3659,7 @@ gs_flatpak_add_alternates (GsFlatpak *self,
return FALSE;
locker = g_rw_lock_reader_locker_new (&self->silo_lock);
- if (!gs_appstream_add_alternates (self->plugin, self->silo, app, list_tmp,
+ if (!gs_appstream_add_alternates (self->silo, app, list_tmp,
cancellable, error))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]