From 9fb0a917f4724ff3a09ca470a837337ad6ba1067 Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Mon, 17 Feb 2025 23:08:11 +0100 Subject: [PATCH] remove test sublists --- application/window.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/application/window.c b/application/window.c index a5a44aa..9df9370 100644 --- a/application/window.c +++ b/application/window.c @@ -74,27 +74,6 @@ MainWindow* window_init_data(UiObject *obj) { obj->window = wdata; wdata->notebooks = ui_list_new(obj->ctx, NULL); - wdata->test1 = ui_list_new(obj->ctx, NULL); - wdata->test2 = ui_list_new(obj->ctx, NULL); - - ui_list_append(wdata->test1, "Test1"); - ui_list_append(wdata->test1, "Test2"); - ui_list_append(wdata->test1, "Test3"); - - ui_list_append(wdata->test2, "Test2 X1"); - ui_list_append(wdata->test2, "Test2 X2"); - - UiSubList *s1 = calloc(1, sizeof(UiSubList)); - UiSubList *s2 = calloc(1, sizeof(UiSubList)); - - s1->value = wdata->test1; - s2->value = wdata->test2; - - s1->header = "Test 1"; - s2->header = "Test 2"; - - //ui_list_append(wdata->notebooks, s1); - //ui_list_append(wdata->notebooks, s2); update_sublists(obj->ctx, wdata->notebooks); return wdata; @@ -157,6 +136,9 @@ void update_sublists(UiContext *ctx, UiList *sublists) { } } + if(sublists->update) { + sublists->update(sublists, 0); + } // now we can free the list delete_list->collection.advanced_destructor = (cx_destructor_func2)sublist_free; -- 2.43.5