ui/motif/text.c

changeset 154
8a4451fcb736
parent 153
ee49d1852a5f
child 155
b907d8059290
equal deleted inserted replaced
153:ee49d1852a5f 154:8a4451fcb736
460 str->value.free = (ui_freefunc)XtFree; 460 str->value.free = (ui_freefunc)XtFree;
461 return value; 461 return value;
462 } 462 }
463 463
464 void ui_textfield_set(UiString *str, char *value) { 464 void ui_textfield_set(UiString *str, char *value) {
465 XmTextSetString(str->obj, value);
465 if(str->value.ptr) { 466 if(str->value.ptr) {
466 str->value.free(str->value.ptr); 467 str->value.free(str->value.ptr);
467 } 468 }
468 str->value.ptr = NULL; 469 str->value.ptr = NULL;
469 XmTextSetString(str->obj, value); 470 }
470 } 471
471

mercurial