[gnome-builder] libide/tweaks: recurse through toplevel item



commit 3c3ef33ff312e5e5a4817ab6fe58a03265ad48d3
Author: Christian Hergert <chergert redhat com>
Date:   Tue Aug 2 23:23:09 2022 -0700

    libide/tweaks: recurse through toplevel item
    
    We don't need to match the item that was requested.

 src/libide/tweaks/ide-tweaks-panel-list.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/tweaks/ide-tweaks-panel-list.c b/src/libide/tweaks/ide-tweaks-panel-list.c
index 26cf99e4f..2c0947ed4 100644
--- a/src/libide/tweaks/ide-tweaks-panel-list.c
+++ b/src/libide/tweaks/ide-tweaks-panel-list.c
@@ -60,6 +60,9 @@ panel_list_visitor (IdeTweaksItem *item,
 {
   static GType page_type;
 
+  if (item == user_data)
+    return IDE_TWEAKS_ITEM_VISIT_RECURSE;
+
   if (!page_type)
     page_type = IDE_TYPE_TWEAKS_PAGE;
 
@@ -98,7 +101,7 @@ ide_tweaks_panel_list_set_item (IdeTweaksPanelList *self,
 
       if (item != NULL)
         {
-          model = ide_tweaks_model_new (item, panel_list_visitor, NULL, NULL);
+          model = ide_tweaks_model_new (item, panel_list_visitor, item, NULL);
           gtk_list_box_bind_model (self->list_box,
                                    G_LIST_MODEL (model),
                                    ide_tweaks_panel_list_create_row_cb,


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