From: Olaf Wintermann Date: Mon, 17 Feb 2025 22:08:11 +0000 (+0100) Subject: remove test sublists X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=9fb0a917f4724ff3a09ca470a837337ad6ba1067;p=note.git remove test sublists --- 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;