- string tmplen = string(tmp.begin(), p);
- if (isStrDbl(tmplen))
- len = tmplen;
- string unit = string(p, tmp.end());
- unit = subst(unit, "%", "%%");
-
- for(int i = 0; i < fl_get_choice_maxitems(choice); ++i) {
- string const text = fl_get_choice_item_text(choice,i+1);
- if (unit == lowercase(strip(frontStrip(text)))) {
- unitpos = i+1;
- break;
- }
- }
- }
-
- fl_set_input(input, len.c_str());
- fl_set_choice(choice, unitpos);
-}
-#else
-void updateWidgetsFromLengthString(FL_OBJECT * input, FL_OBJECT * choice,
- string const & str,
- string const & default_unit)
-{
- updateWidgetsFromLength(input, choice,