X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8d656ea93c0f3d53f97a1c67244baa39d72b7334..04fdd8736a403bb3c6b2bd1430e48178dd8b7e45:/src/cocoa/button.mm diff --git a/src/cocoa/button.mm b/src/cocoa/button.mm index 74a927eb32..7b93013217 100644 --- a/src/cocoa/button.mm +++ b/src/cocoa/button.mm @@ -43,7 +43,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid, [m_cocoaNSView release]; [GetNSButton() setBezelStyle:NSRoundedBezelStyle]; - [GetNSButton() setTitle:wxNSStringWithWxString(label)]; + [GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))]; [GetNSControl() sizeToFit]; if(m_parent) @@ -55,7 +55,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid, wxButton::~wxButton() { - DisassociateNSButton(m_cocoaNSView); + DisassociateNSButton(GetNSButton()); } void wxButton::Cocoa_wxNSButtonAction(void) @@ -73,7 +73,7 @@ wxString wxButton::GetLabel() const void wxButton::SetLabel(const wxString& label) { - [GetNSButton() setTitle:wxNSStringWithWxString(label)]; + [GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))]; } wxSize wxButtonBase::GetDefaultSize()