ui/gtk/list.c

changeset 439
bf7084544cb1
parent 438
7b1d715e5c11
child 440
7c4b9cba09ca
--- a/ui/gtk/list.c	Sun Jan 05 17:31:53 2025 +0100
+++ b/ui/gtk/list.c	Sun Jan 05 17:41:39 2025 +0100
@@ -204,7 +204,7 @@
 UIWIDGET ui_listview_create(UiObject *obj, UiListArgs args) {
     UiObject* current = uic_current_obj(obj);
     
-    // to simplify things and share code with ui_tableview_create, we also
+    // to simplify things and share code with ui_table_create, we also
     // use a UiModel for the listview
     UiModel *model = ui_model(obj->ctx, UI_STRING, "", -1);
     model->getvalue = args.getvalue ? args.getvalue : ui_strmodel_getvalue;
@@ -720,6 +720,8 @@
     listview->widget = view;
     listview->var = var;
     listview->model = model;
+    listview->selection.count = 0;
+    listview->selection.rows = NULL;
     g_signal_connect(
                 view,
                 "destroy",

mercurial