X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a0c6a355b7b53866286ec6263b99f787cfdbe731..e4f1a68ad1a4c145878a7595c06859d3d59fc6e7:/src/cocoa/checkbox.mm diff --git a/src/cocoa/checkbox.mm b/src/cocoa/checkbox.mm index 90dd25fba1..04204304f1 100644 --- a/src/cocoa/checkbox.mm +++ b/src/cocoa/checkbox.mm @@ -9,11 +9,15 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#include "wx/app.h" -#include "wx/checkbox.h" -#include "wx/log.h" +#include "wx/wxprec.h" +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" + #include "wx/checkbox.h" +#endif //WX_PRECOMP #include "wx/cocoa/autorelease.h" +#include "wx/cocoa/string.h" #import #import @@ -38,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) @@ -50,7 +54,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid, wxCheckBox::~wxCheckBox() { - DisassociateNSButton(m_cocoaNSView); + DisassociateNSButton(GetNSButton()); } void wxCheckBox::SetValue(bool value)