+void widget_select_drop_options(struct nc_widget_select *select)
+{
+ struct nc_widgetset *set = select->set;
+ int i;
+
+ for (i = 0; i < select->n_options; i++) {
+ FIELD *field = select->options[i].field;
+ widgetset_remove_field(set, field);
+ if (field == set->cur_field)
+ set->cur_field = NULL;
+ free_field(select->options[i].field);
+ }
+
+ talloc_free(select->options);
+ select->options = NULL;
+ select->n_options = 0;
+ select->widget.height = 0;
+ select->widget.focus_y = 0;
+
+}
+