127 UcxList *itemList = ucx_map_get(menus, ucx_key(&menu, sizeof(void*))); |
127 UcxList *itemList = ucx_map_get(menus, ucx_key(&menu, sizeof(void*))); |
128 UCX_FOREACH(elm, itemList) { |
128 UCX_FOREACH(elm, itemList) { |
129 UiAbstractMenuItem *item = elm->data; |
129 UiAbstractMenuItem *item = elm->data; |
130 item->update(self, item->item_data); |
130 item->update(self, item->item_data); |
131 } |
131 } |
|
132 |
|
133 // update group items |
|
134 // TODO: use only one loop for all items |
|
135 int ngroups = 0; |
|
136 int *groups = ui_active_groups(uiobj->ctx, &ngroups); |
|
137 |
|
138 NSArray *groupItems = [menu itemArray]; |
|
139 int count = [groupItems count]; |
|
140 for(int i=0;i<count;i++) { |
|
141 id item = [groupItems objectAtIndex:i]; |
|
142 if([item class] == [UiGroupMenuItem class]) { |
|
143 [item checkGroups: groups count:ngroups]; |
|
144 } |
|
145 } |
132 } |
146 } |
133 |
147 |
134 @end |
148 @end |
135 |
149 |
136 |
150 |