X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/449c567346a1b3937e532cd87aac007faad76b04..6612393c0080efbe5b12457434b794dc1a2cc1d8:/src/cocoa/checkbox.mm diff --git a/src/cocoa/checkbox.mm b/src/cocoa/checkbox.mm index 710a63b1f4..04204304f1 100644 --- a/src/cocoa/checkbox.mm +++ b/src/cocoa/checkbox.mm @@ -17,6 +17,7 @@ #endif //WX_PRECOMP #include "wx/cocoa/autorelease.h" +#include "wx/cocoa/string.h" #import #import @@ -41,7 +42,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid, SetNSButton([[NSButton alloc] initWithFrame: MakeDefaultNSRect(size)]); [m_cocoaNSView release]; [GetNSButton() setButtonType: NSSwitchButton]; - [GetNSButton() setTitle:[NSString stringWithCString: label.c_str()]]; + [GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))]; [GetNSControl() sizeToFit]; if(m_parent) @@ -53,7 +54,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid, wxCheckBox::~wxCheckBox() { - DisassociateNSButton(m_cocoaNSView); + DisassociateNSButton(GetNSButton()); } void wxCheckBox::SetValue(bool value)