X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec75d791f043b3b43cac9825a2c62e9d5321e616..34433938892a8b9588269e8a20ccb6dba9a9c1b3:/src/motif/control.cpp diff --git a/src/motif/control.cpp b/src/motif/control.cpp index af57174fe6..e488c043aa 100644 --- a/src/motif/control.cpp +++ b/src/motif/control.cpp @@ -89,8 +89,7 @@ void wxControl::SetLabel(const wxString& label) if (!widget) return; - wxString buf(wxStripMenuCodes(label)); - wxXmString label_str(buf); + wxXmString label_str(wxStripMenuCodes(label)); XtVaSetValues (widget, XmNlabelString, label_str(), @@ -105,23 +104,11 @@ wxString wxControl::GetLabel() const return wxEmptyString; XmString text; - char *s; XtVaGetValues (widget, XmNlabelString, &text, NULL); - if (XmStringGetLtoR (text, XmSTRING_DEFAULT_CHARSET, &s)) - { - wxString str(s); - XtFree (s); - XmStringFree(text); - return str; - } - else - { - // XmStringFree(text); - return wxEmptyString; - } + return wxXmStringToString( text ); } bool wxControl::ProcessCommand(wxCommandEvent & event)