]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/button.mm
Fixed Mac CodeWarrior compilation (there's no <sys/types.h>).
[wxWidgets.git] / src / cocoa / button.mm
index 74a927eb3252ec02f2a22e6981b7f4a4ba98605f..7b93013217cb15932c6238b39e7a38406a41fb49 100644 (file)
@@ -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()