--- a/ui/winui/text.cpp Sat Jan 27 17:50:19 2024 +0100 +++ b/ui/winui/text.cpp Sun Jan 28 16:31:34 2024 +0100 @@ -114,7 +114,7 @@ // -------------------------- getter/setter for textfield UiString -------------------------- -char* ui_string_get(UiString* str, std::wstring &value) { +char* ui_wstring_get(UiString* str, std::wstring &value) { if (str->value.ptr) { str->value.free(str->value.ptr); } @@ -125,7 +125,7 @@ return str->value.ptr; } -std::wstring ui_string_set(UiString* str, const char* value) { +std::wstring ui_wstring_set(UiString* str, const char* value) { if (str->value.ptr) { str->value.free(str->value.ptr); } @@ -145,13 +145,13 @@ UiWidget* widget = (UiWidget*)str->obj; TextBox box = widget->uielement.as<TextBox>(); std::wstring wstr(box.Text()); - return ui_string_get(str, wstr); + return ui_wstring_get(str, wstr); } void ui_textfield_set(UiString * str, const char* newvalue) { UiWidget* widget = (UiWidget*)str->obj; TextBox box = widget->uielement.as<TextBox>(); - box.Text(ui_string_set(str, newvalue)); + box.Text(ui_wstring_set(str, newvalue)); } @@ -159,13 +159,13 @@ UiWidget* widget = (UiWidget*)str->obj; PasswordBox box = widget->uielement.as<PasswordBox>(); std::wstring wstr(box.Password()); - return ui_string_get(str, wstr); + return ui_wstring_get(str, wstr); } void ui_passwordfield_set(UiString * str, const char* newvalue) { UiWidget* widget = (UiWidget*)str->obj; PasswordBox box = widget->uielement.as<PasswordBox>(); - box.Password(ui_string_set(str, newvalue)); + box.Password(ui_wstring_set(str, newvalue)); } @@ -304,13 +304,13 @@ UiPathTextField* widget = (UiPathTextField*)str->obj; TextBox box = widget->textbox; std::wstring wstr(box.Text()); - return ui_string_get(str, wstr); + return ui_wstring_get(str, wstr); } void ui_path_textfield_set(UiString* str, const char* newvalue) { UiPathTextField* widget = (UiPathTextField*)str->obj; TextBox box = widget->textbox; - box.Text(ui_string_set(str, newvalue)); + box.Text(ui_wstring_set(str, newvalue)); ui_pathtextfield_update(widget, newvalue); }