| 2618 } |
2618 } |
| 2619 |
2619 |
| 2620 LISTBOX_ROW_REMOVE_CHILD(row); |
2620 LISTBOX_ROW_REMOVE_CHILD(row); |
| 2621 |
2621 |
| 2622 listbox_fill_row(listbox, GTK_WIDGET(row), sublist, &item, index); |
2622 listbox_fill_row(listbox, GTK_WIDGET(row), sublist, &item, index); |
| |
2623 LISTBOX_ROW_SHOW(row); |
| 2623 |
2624 |
| 2624 // cleanup |
2625 // cleanup |
| 2625 free(item.label); |
2626 free(item.label); |
| 2626 free(item.icon); |
2627 free(item.icon); |
| 2627 free(item.button_label); |
2628 free(item.button_label); |
| 2754 g_signal_connect(row, "enter-notify-event", G_CALLBACK(listbox_row_enter), NULL); |
2755 g_signal_connect(row, "enter-notify-event", G_CALLBACK(listbox_row_enter), NULL); |
| 2755 g_signal_connect(row, "leave-notify-event", G_CALLBACK(listbox_row_leave), NULL); |
2756 g_signal_connect(row, "leave-notify-event", G_CALLBACK(listbox_row_leave), NULL); |
| 2756 #endif |
2757 #endif |
| 2757 |
2758 |
| 2758 listbox_fill_row(listbox, row, sublist, &item, index); |
2759 listbox_fill_row(listbox, row, sublist, &item, index); |
| |
2760 LISTBOX_ROW_SHOW(row); |
| 2759 if(index == first_index) { |
2761 if(index == first_index) { |
| 2760 // first row in the sublist, set ui_listbox data to the row |
2762 // first row in the sublist, set ui_listbox data to the row |
| 2761 // which is then used by the headerfunc |
2763 // which is then used by the headerfunc |
| 2762 g_object_set_data(G_OBJECT(row), "ui_listbox", listbox); |
2764 g_object_set_data(G_OBJECT(row), "ui_listbox", listbox); |
| 2763 g_object_set_data(G_OBJECT(row), "ui_listbox_sublist", sublist); |
2765 g_object_set_data(G_OBJECT(row), "ui_listbox_sublist", sublist); |