From 677d7f2414c1be11745b960ce67f8e7ccf838593 Mon Sep 17 00:00:00 2001 From: David Elliott Date: Mon, 8 Sep 2003 19:42:35 +0000 Subject: [PATCH] Use wxStripMenuCodes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/button.mm | 4 ++-- src/cocoa/checkbox.mm | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cocoa/button.mm b/src/cocoa/button.mm index 093bc3fcf5..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) @@ -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() diff --git a/src/cocoa/checkbox.mm b/src/cocoa/checkbox.mm index b43f179077..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) -- 2.45.2