[gnome-software: 9/22] gs-appstream: Select featured apps using new custom values
- From: Phaedrus Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 9/22] gs-appstream: Select featured apps using new custom values
- Date: Thu, 18 Feb 2021 07:33:02 +0000 (UTC)
commit 0d9dda9bf83230066e0373a730c37a9fdd695fac
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Feb 15 15:30:21 2021 +0000
gs-appstream: Select featured apps using new custom values
Use a new `GnomeSoftware::FeatureTile` custom key, rather than the
custom CSS key which has been used previously. This is because featured
apps no longer need custom CSS by default, so we’d expect a lot of them
to not provide any.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1131
lib/gs-plugin-vfuncs.h | 2 +-
plugins/core/gs-appstream.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 6ed7a0377..7f7361b05 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -370,7 +370,7 @@ gboolean gs_plugin_add_popular (GsPlugin *plugin,
* 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-css</code>.
+ * results, for instance <code>GnomeSoftware::FeatureTile</code>.
*
* Plugins are expected to add new apps using gs_app_list_add().
*
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 6fd38cc4c..930416ae7 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -1515,8 +1515,8 @@ gs_appstream_add_featured (GsPlugin *plugin,
/* find out how many packages are in each category */
array = xb_silo_query (silo,
- "components/component/custom/"
- "value[@key='GnomeSoftware::FeatureTile-css']/../..",
+ "components/component/custom/value[@key='GnomeSoftware::FeatureTile']/../..|"
+
"components/component/custom/value[@key='GnomeSoftware::FeatureTile-css']/../..",
0, &error_local);
if (array == NULL) {
if (g_error_matches (error_local, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]