1498 |
1498 |
1499 |
1499 |
1500 /* ------------------------------ Source List ------------------------------ */ |
1500 /* ------------------------------ Source List ------------------------------ */ |
1501 |
1501 |
1502 static void ui_destroy_sourcelist(GtkWidget *w, UiListBox *v) { |
1502 static void ui_destroy_sourcelist(GtkWidget *w, UiListBox *v) { |
1503 cxListDestroy(v->sublists); |
1503 cxListFree(v->sublists); |
1504 free(v); |
1504 free(v); |
1505 } |
1505 } |
1506 |
1506 |
1507 static void sublist_destroy(UiObject *obj, UiListBoxSubList *sublist) { |
1507 static void sublist_destroy(UiObject *obj, UiListBoxSubList *sublist) { |
1508 free(sublist->header); |
1508 free(sublist->header); |
1509 ui_destroy_boundvar(obj->ctx, sublist->var); |
1509 ui_destroy_boundvar(obj->ctx, sublist->var); |
1510 cxListDestroy(sublist->widgets); |
1510 cxListFree(sublist->widgets); |
1511 } |
1511 } |
1512 |
1512 |
1513 static void listbox_create_header(GtkListBoxRow* row, GtkListBoxRow* before, gpointer user_data) { |
1513 static void listbox_create_header(GtkListBoxRow* row, GtkListBoxRow* before, gpointer user_data) { |
1514 // first rows in sublists have the ui_listbox property |
1514 // first rows in sublists have the ui_listbox property |
1515 UiListBox *listbox = g_object_get_data(G_OBJECT(row), "ui_listbox"); |
1515 UiListBox *listbox = g_object_get_data(G_OBJECT(row), "ui_listbox"); |