184 } |
184 } |
185 return sel; |
185 return sel; |
186 } |
186 } |
187 |
187 |
188 void ui_listview_setselection(UiList *list, UiListSelection selection) { |
188 void ui_listview_setselection(UiList *list, UiListSelection selection) { |
|
189 ui_setop_enable(TRUE); |
189 UiListView *listview = list->obj; |
190 UiListView *listview = list->obj; |
190 XmListDeselectAllItems(listview->widget); |
191 XmListDeselectAllItems(listview->widget); |
191 for(int i=0;i<selection.count;i++) { |
192 for(int i=0;i<selection.count;i++) { |
192 XmListSelectPos(listview->widget, selection.rows[i]+1, False); |
193 XmListSelectPos(listview->widget, selection.rows[i]+1, False); |
193 } |
194 } |
|
195 ui_setop_enable(FALSE); |
194 } |
196 } |
195 |
197 |
196 void* ui_strmodel_getvalue(void *elm, int column) { |
198 void* ui_strmodel_getvalue(void *elm, int column) { |
197 return column == 0 ? elm : NULL; |
199 return column == 0 ? elm : NULL; |
198 } |
200 } |