| 2577 listbox->getvalue(list, sublist->userdata, elm, index, &item, listbox->getvaluedata); |
2577 listbox->getvalue(list, sublist->userdata, elm, index, &item, listbox->getvaluedata); |
| 2578 } else { |
2578 } else { |
| 2579 item.label = strdup(elm); |
2579 item.label = strdup(elm); |
| 2580 } |
2580 } |
| 2581 |
2581 |
| |
2582 if(item.label == NULL && index == -1 && sublist->header) { |
| |
2583 item.label = strdup(sublist->header); |
| |
2584 } |
| |
2585 |
| 2582 // create listbox item |
2586 // create listbox item |
| 2583 GtkWidget *row = gtk_list_box_row_new(); |
2587 GtkWidget *row = gtk_list_box_row_new(); |
| 2584 #if GTK_CHECK_VERSION(4, 0, 0) |
2588 #if GTK_CHECK_VERSION(4, 0, 0) |
| 2585 GtkEventController *motion_controller = gtk_event_controller_motion_new(); |
2589 GtkEventController *motion_controller = gtk_event_controller_motion_new(); |
| 2586 gtk_widget_add_controller(GTK_WIDGET(row), motion_controller); |
2590 gtk_widget_add_controller(GTK_WIDGET(row), motion_controller); |