73 lines
2.0 KiB
Diff
73 lines
2.0 KiB
Diff
|
From f148ef7e91716bf6cac069eb61f0ecb370507dc9 Mon Sep 17 00:00:00 2001
|
||
|
From: Milan Crha <mcrha@redhat.com>
|
||
|
Date: Thu, 15 Apr 2021 18:49:08 +0200
|
||
|
Subject: [PATCH 2/2] flatpak: Implement gs_plugin_add_search_what_provides()
|
||
|
|
||
|
Let the Flatpak plugin search for "what provides" as well. It's the same
|
||
|
search, due to the appstream search terms, and it gets more results to
|
||
|
pick from.
|
||
|
|
||
|
Related https://gitlab.gnome.org/GNOME/gnome-software/-/issues/613
|
||
|
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1210
|
||
|
---
|
||
|
plugins/flatpak/gs-plugin-flatpak.c | 33 +++++++++++++++++++++++------
|
||
|
1 file changed, 27 insertions(+), 6 deletions(-)
|
||
|
|
||
|
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
|
||
|
index 364bc27d..808e1a56 100644
|
||
|
--- a/plugins/flatpak/gs-plugin-flatpak.c
|
||
|
+++ b/plugins/flatpak/gs-plugin-flatpak.c
|
||
|
@@ -1444,12 +1444,12 @@ gs_plugin_file_to_app (GsPlugin *plugin,
|
||
|
return TRUE;
|
||
|
}
|
||
|
|
||
|
-gboolean
|
||
|
-gs_plugin_add_search (GsPlugin *plugin,
|
||
|
- gchar **values,
|
||
|
- GsAppList *list,
|
||
|
- GCancellable *cancellable,
|
||
|
- GError **error)
|
||
|
+static gboolean
|
||
|
+gs_plugin_flatpak_do_search (GsPlugin *plugin,
|
||
|
+ gchar **values,
|
||
|
+ GsAppList *list,
|
||
|
+ GCancellable *cancellable,
|
||
|
+ GError **error)
|
||
|
{
|
||
|
GsPluginData *priv = gs_plugin_get_data (plugin);
|
||
|
for (guint i = 0; i < priv->flatpaks->len; i++) {
|
||
|
@@ -1459,9 +1459,30 @@ gs_plugin_add_search (GsPlugin *plugin,
|
||
|
return FALSE;
|
||
|
}
|
||
|
}
|
||
|
+
|
||
|
return TRUE;
|
||
|
}
|
||
|
|
||
|
+gboolean
|
||
|
+gs_plugin_add_search (GsPlugin *plugin,
|
||
|
+ gchar **values,
|
||
|
+ GsAppList *list,
|
||
|
+ GCancellable *cancellable,
|
||
|
+ GError **error)
|
||
|
+{
|
||
|
+ return gs_plugin_flatpak_do_search (plugin, values, list, cancellable, error);
|
||
|
+}
|
||
|
+
|
||
|
+gboolean
|
||
|
+gs_plugin_add_search_what_provides (GsPlugin *plugin,
|
||
|
+ gchar **search,
|
||
|
+ GsAppList *list,
|
||
|
+ GCancellable *cancellable,
|
||
|
+ GError **error)
|
||
|
+{
|
||
|
+ return gs_plugin_flatpak_do_search (plugin, search, list, cancellable, error);
|
||
|
+}
|
||
|
+
|
||
|
gboolean
|
||
|
gs_plugin_add_categories (GsPlugin *plugin,
|
||
|
GPtrArray *list,
|
||
|
--
|
||
|
2.31.1
|
||
|
|