[gnome-software/1021-please-add-a-way-to-show-only-open-source-apps: 3/6] gs-page: Add gs_page_get_list_apps_flags()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1021-please-add-a-way-to-show-only-open-source-apps: 3/6] gs-page: Add gs_page_get_list_apps_flags()
- Date: Fri, 14 Oct 2022 07:01:36 +0000 (UTC)
commit ce41a7a807bae47262b61b6269f11f153f814ae2
Author: Milan Crha <mcrha redhat com>
Date: Fri Oct 14 08:25:08 2022 +0200
gs-page: Add gs_page_get_list_apps_flags()
Makes it simpler to get to the flags in the pages, without a need
to know where the flags come from.
src/gs-page.c | 9 +++++++++
src/gs-page.h | 2 ++
2 files changed, 11 insertions(+)
---
diff --git a/src/gs-page.c b/src/gs-page.c
index 7a465bede..24274bbe9 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -855,3 +855,12 @@ gs_page_new (void)
{
return GS_PAGE (g_object_new (GS_TYPE_PAGE, NULL));
}
+
+GsPluginListAppsFlags
+gs_page_get_list_apps_flags (GsPage *self)
+{
+ GsPagePrivate *priv = gs_page_get_instance_private (self);
+ g_return_val_if_fail (GS_IS_PAGE (self), GS_PLUGIN_LIST_APPS_FLAGS_NONE);
+ g_return_val_if_fail (priv->shell != NULL, GS_PLUGIN_LIST_APPS_FLAGS_NONE);
+ return gs_shell_get_list_apps_flags (priv->shell);
+}
diff --git a/src/gs-page.h b/src/gs-page.h
index a42034b59..e3a352914 100644
--- a/src/gs-page.h
+++ b/src/gs-page.h
@@ -70,5 +70,7 @@ gboolean gs_page_is_active (GsPage *page);
const gchar *gs_page_get_title (GsPage *page);
guint gs_page_get_counter (GsPage *page);
GtkAdjustment *gs_page_get_vadjustment (GsPage *page);
+GsPluginListAppsFlags
+ gs_page_get_list_apps_flags (GsPage *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]