]> uap-core.de Git - note.git/commitdiff
remove test sublists
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Mon, 17 Feb 2025 22:08:11 +0000 (23:08 +0100)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Mon, 17 Feb 2025 22:08:11 +0000 (23:08 +0100)
application/window.c

index a5a44aa19015b3874c43f2c044a5e8b75e659c13..9df9370c1760c4bf443e6c8acc25ab805e81aaf0 100644 (file)
@@ -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;