129 |
129 |
130 if(i->groups) { |
130 if(i->groups) { |
131 CxList *groups = cxArrayListCreateSimple(sizeof(int), i->ngroups); |
131 CxList *groups = cxArrayListCreateSimple(sizeof(int), i->ngroups); |
132 cxListAddArray(groups, i->groups, i->ngroups); |
132 cxListAddArray(groups, i->groups, i->ngroups); |
133 uic_add_group_widget(obj->ctx, widget, (ui_enablefunc)ui_set_enabled, groups); |
133 uic_add_group_widget(obj->ctx, widget, (ui_enablefunc)ui_set_enabled, groups); |
134 cxListDestroy(groups); |
134 cxListFree(groups); |
135 } |
135 } |
136 } |
136 } |
137 |
137 |
138 /* |
138 /* |
139 void add_menuitem_st_widget( |
139 void add_menuitem_st_widget( |
462 |
462 |
463 if(i->groups) { |
463 if(i->groups) { |
464 CxList *groups = cxArrayListCreateSimple(sizeof(int), i->ngroups); |
464 CxList *groups = cxArrayListCreateSimple(sizeof(int), i->ngroups); |
465 cxListAddArray(groups, i->groups, i->ngroups); |
465 cxListAddArray(groups, i->groups, i->ngroups); |
466 uic_add_group_widget(obj->ctx, action, (ui_enablefunc)action_enable, groups); |
466 uic_add_group_widget(obj->ctx, action, (ui_enablefunc)action_enable, groups); |
467 cxListDestroy(groups); |
467 cxListFree(groups); |
468 } |
468 } |
469 |
469 |
470 if(i->callback != NULL) { |
470 if(i->callback != NULL) { |
471 UiEventData *event = malloc(sizeof(UiEventData)); |
471 UiEventData *event = malloc(sizeof(UiEventData)); |
472 event->obj = obj; |
472 event->obj = obj; |