X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/449c567346a1b3937e532cd87aac007faad76b04..d2980921209fdf004244a72ebf88658987e2a986:/src/cocoa/checkbox.mm diff --git a/src/cocoa/checkbox.mm b/src/cocoa/checkbox.mm index 710a63b1f4..ff4513b70b 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) @@ -73,7 +74,7 @@ bool wxCheckBox::GetValue() const void wxCheckBox::Cocoa_wxNSButtonAction(void) { - wxLogDebug("Checkbox"); + wxLogDebug(wxT("Checkbox")); wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, GetId()); InitCommandEvent(event); // event.SetEventObject(this); event.SetInt(GetValue());