application/window.c

changeset 109
c3dfcb8f0be7
parent 108
77254bd6dccb
child 111
81c4f73236a4
--- a/application/window.c	Sun Jul 20 22:04:39 2025 +0200
+++ b/application/window.c	Sun Aug 24 15:24:16 2025 +0200
@@ -95,10 +95,10 @@
     UiModel* model = ui_model(obj->ctx, UI_ICON_TEXT, "Name", UI_STRING_FREE, "Flags", UI_STRING, "Type", UI_STRING_FREE, "Last Modified", UI_STRING_FREE, "Size", -1);
     model->columnsize[0] = -1;
     model->columnsize[2] = 150;
-    model->getvalue = (ui_getvaluefunc) window_resource_table_getvalue;
     ui_table(obj,
             .fill = TRUE,
             .model = model,
+            .getvalue = (ui_getvaluefunc) window_resource_table_getvalue,
             .onselection = action_list_selection,
             .onactivate = action_list_activate,
             .ondragstart = action_dnd_start,
@@ -255,8 +255,13 @@
                 
                 ui_tab(win, "Properties") {
                     UiModel* model = ui_model(win->ctx, UI_STRING, "Namespace", UI_STRING, "Name", UI_STRING, "Value", -1);
-                    model->getvalue = (ui_getvaluefunc) resourceviewer_proplist_getvalue;
-                    ui_table(win, .fill = TRUE, .model = model, .varname = "properties", .onselection = action_resourceviewer_property_select, .onactivate = action_resourceviewer_property_activate);
+                    ui_table(win,
+                            .fill = TRUE,
+                            .model = model,
+                            .getvalue = (ui_getvaluefunc) resourceviewer_proplist_getvalue,
+                            .varname = "properties",
+                            .onselection = action_resourceviewer_property_select,
+                            .onactivate = action_resourceviewer_property_activate);
                     ui_hbox(win, .margin = 4, .spacing = 4) {
                         ui_button(win, .label = "Add", .onclick = action_resourceviewer_property_add);
                         ui_button(win, .label = "Edit", .onclick = action_resourceviewer_property_edit, .groups = UI_GROUPS(RESOURCEVIEWER_STATE_PROP_SELECTED));

mercurial