[gnome-software/1307-installed-page-empty-sections-not-hidden] gs-installed-page: Add an app, only if it can be shown in the group
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1307-installed-page-empty-sections-not-hidden] gs-installed-page: Add an app, only if it can be shown in the group
- Date: Wed, 28 Jul 2021 16:24:26 +0000 (UTC)
commit 8b2f14412fd65de4d55765b830ed86a25b3cfba7
Author: Milan Crha <mcrha redhat com>
Date: Wed Jul 28 18:22:17 2021 +0200
gs-installed-page: Add an app, only if it can be shown in the group
No need to pile into the group's listbox an application, which is not visible.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1307
src/gs-installed-page.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index 3291050c9..67a4b7a51 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -214,6 +214,10 @@ gs_installed_page_add_app (GsInstalledPage *self, GsAppList *list, GsApp *app)
{
GtkWidget *app_row;
+ /* only show if is an actual application */
+ if (!gs_installed_page_is_actual_app (app))
+ return;
+
app_row = g_object_new (GS_TYPE_APP_ROW,
"app", app,
"show-buttons", TRUE,
@@ -254,9 +258,6 @@ gs_installed_page_add_app (GsInstalledPage *self, GsAppList *list, GsApp *app)
gs_app_row_set_show_description (GS_APP_ROW (app_row), FALSE);
gs_app_row_set_show_source (GS_APP_ROW (app_row), FALSE);
g_object_bind_property (self, "is-narrow", app_row, "is-narrow", G_BINDING_SYNC_CREATE);
-
- /* only show if is an actual application */
- gtk_widget_set_visible (app_row, gs_installed_page_is_actual_app (app));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]