X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b0ee47ff76c278c053ac2ad36bb3129b0fcd050f..e7300ec6d9ebbd1cfa2fcf12c0ce6e5aee85a152:/src/motif/control.cpp diff --git a/src/motif/control.cpp b/src/motif/control.cpp index 894198a0a1..1dc7e344c5 100644 --- a/src/motif/control.cpp +++ b/src/motif/control.cpp @@ -27,6 +27,8 @@ #pragma message enable nosimpint #endif +#include "wx/motif/private.h" + IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) BEGIN_EVENT_TABLE(wxControl, wxWindow) @@ -68,14 +70,13 @@ void wxControl::SetLabel(const wxString& label) if (!widget) return; - wxStripMenuCodes((char*) (const char*) label, wxBuffer); + wxString buf(wxStripMenuCodes(label)); + wxXmString label_str(buf); - XmString text = XmStringCreateSimple (wxBuffer); XtVaSetValues (widget, - XmNlabelString, text, + XmNlabelString, label_str(), XmNlabelType, XmSTRING, NULL); - XmStringFree (text); } wxString wxControl::GetLabel() const