[gnome-software: 48/110] gs-os-update-page: Adapt to GtkBox API changes




commit 27a2d062c39a83cad58286e36c1a35604efaf74a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Aug 24 10:26:41 2021 -0300

    gs-os-update-page: Adapt to GtkBox API changes

 src/gs-os-update-page.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-os-update-page.c b/src/gs-os-update-page.c
index ab8aba33a..483832e3d 100644
--- a/src/gs-os-update-page.c
+++ b/src/gs-os-update-page.c
@@ -324,6 +324,7 @@ static void
 create_section (GsOsUpdatePage *page, GsOsUpdatePageSection section)
 {
        GtkStyleContext *context;
+       GtkWidget *previous = NULL;
 
        page->list_boxes[section] = gtk_list_box_new ();
        gtk_list_box_set_selection_mode (GTK_LIST_BOX (page->list_boxes[section]),
@@ -345,8 +346,10 @@ create_section (GsOsUpdatePage *page, GsOsUpdatePageSection section)
        for (guint i = 0; i < GS_OS_UPDATE_PAGE_SECTION_LAST; i++) {
                if (page->list_boxes[i] == NULL)
                        continue;
-               gtk_box_reorder_child (GTK_BOX (page->box),
-                                      page->list_boxes[i], i);
+               gtk_box_reorder_child_after (GTK_BOX (page->box),
+                                            page->list_boxes[i],
+                                            previous);
+               previous = page->list_boxes[i];
        }
 
        /* make rounded edges */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]