From 2bcae546b34022774ed8f9719770e0173f8916bf Mon Sep 17 00:00:00 2001 From: Corey Berla Date: Mon, 25 Jul 2022 17:19:30 -0700 Subject: [PATCH] gridview: Move gtk_grid_view_computer_total_height() up for reuse --- gtk/gtkgridview.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gtk/gtkgridview.c b/gtk/gtkgridview.c index 6ee96d9df5..6f2b7b0354 100644 --- a/gtk/gtkgridview.c +++ b/gtk/gtkgridview.c @@ -413,6 +413,19 @@ gtk_grid_view_get_allocation_across (GtkListBase *base, return TRUE; } +static int +gtk_grid_view_compute_total_height (GtkGridView *self) +{ + Cell *cell; + CellAugment *aug; + + cell = gtk_list_item_manager_get_root (self->item_manager); + if (cell == NULL) + return 0; + aug = gtk_list_item_manager_get_item_augment (self->item_manager, cell); + return aug->size; +} + static gboolean gtk_grid_view_get_position_from_allocation (GtkListBase *base, int across, @@ -722,19 +735,6 @@ cell_set_size (Cell *cell, gtk_rb_tree_node_mark_dirty (cell); } -static int -gtk_grid_view_compute_total_height (GtkGridView *self) -{ - Cell *cell; - CellAugment *aug; - - cell = gtk_list_item_manager_get_root (self->item_manager); - if (cell == NULL) - return 0; - aug = gtk_list_item_manager_get_item_augment (self->item_manager, cell); - return aug->size; -} - static void gtk_grid_view_size_allocate (GtkWidget *widget, int width,