g_list_free(children);
int dlg_listbox_issel(union control *ctrl, void *dlg, int index){    struct dlgparam *dp = (struct dlgparam *)dlg;    struct uctrl *uc = dlg_find_byctrl(dp, ctrl);    GList *children;    GtkWidget *item, *activeitem;    assert(uc->ctrl->generic.type == CTRL_EDITBOX ||	   uc->ctrl->generic.type == CTRL_LISTBOX);    assert(uc->menu != NULL || uc->list != NULL);    children = gtk_container_children(GTK_CONTAINER(uc->menu ? uc->menu :						    uc->list));    item = GTK_WIDGET(g_list_nth_data(children, index));    if (uc->menu) {	activeitem = gtk_menu_get_active(GTK_MENU(uc->menu));	return item == activeitem;    } else {	return GTK_WIDGET_STATE(item) == GTK_STATE_SELECTED;    }}