[gnome-software] gs-installed-page: Set app row properties at construction time
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] gs-installed-page: Set app row properties at construction time
- Date: Tue, 30 Jun 2020 14:52:35 +0000 (UTC)
commit 3af528bb339c8e3328f9af633ce3c71404f9a43e
Author: Philip Withnall <withnall endlessm com>
Date: Fri Jun 19 14:59:35 2020 +0100
gs-installed-page: Set app row properties at construction time
This was accidentally omitted from commit 4a12e80565351793, and is
needed to get the full speedups documented in that commit message.
Signed-off-by: Philip Withnall <withnall endlessm com>
src/gs-installed-page.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index de8a8874..c85f1af2 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -155,10 +155,13 @@ gs_installed_page_add_app (GsInstalledPage *self, GsAppList *list, GsApp *app)
{
GtkWidget *app_row;
- app_row = gs_app_row_new (app);
- gs_app_row_set_show_buttons (GS_APP_ROW (app_row), TRUE);
- if (gs_utils_list_has_app_fuzzy (list, app))
- gs_app_row_set_show_source (GS_APP_ROW (app_row), TRUE);
+ app_row = g_object_new (GS_TYPE_APP_ROW,
+ "app", app,
+ "show-buttons", TRUE,
+ "show-source", gs_utils_list_has_app_fuzzy (list, app),
+ "show-installed-size", !gs_app_has_quirk (app, GS_APP_QUIRK_COMPULSORY) &&
should_show_installed_size (self),
+ NULL);
+
g_signal_connect (app_row, "button-clicked",
G_CALLBACK (gs_installed_page_app_remove_cb), self);
g_signal_connect_object (app, "notify::state",
@@ -171,11 +174,6 @@ gs_installed_page_add_app (GsInstalledPage *self, GsAppList *list, GsApp *app)
self->sizegroup_desc,
self->sizegroup_button);
- if (!gs_app_has_quirk (app, GS_APP_QUIRK_COMPULSORY)) {
- gs_app_row_set_show_installed_size (GS_APP_ROW (app_row),
- should_show_installed_size (self));
- }
-
/* only show if is an actual application */
gtk_widget_set_visible (app_row, gs_installed_page_is_actual_app (app));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]