X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8d656ea93c0f3d53f97a1c67244baa39d72b7334..3a5bcc4db0851bf8cd3063917511b0b17c7f9679:/src/cocoa/statbox.mm diff --git a/src/cocoa/statbox.mm b/src/cocoa/statbox.mm index 00a22bc123..202608a7be 100644 --- a/src/cocoa/statbox.mm +++ b/src/cocoa/statbox.mm @@ -9,10 +9,14 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#include "wx/app.h" -#include "wx/statbox.h" +#include "wx/wxprec.h" +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/statbox.h" +#endif //WX_PRECOMP #include "wx/cocoa/autorelease.h" +#include "wx/cocoa/string.h" #import #import @@ -34,7 +38,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid, return false; m_cocoaNSView = NULL; SetNSBox([[NSBox alloc] initWithFrame:MakeDefaultNSRect(size)]); - [GetNSBox() setTitle:[NSString stringWithCString:title.c_str()]]; + [GetNSBox() setTitle:wxNSStringWithWxString(wxStripMenuCodes(title))]; if(m_parent) m_parent->CocoaAddChild(this); SetInitialFrameRect(pos,size); @@ -44,7 +48,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid, wxStaticBox::~wxStaticBox() { - DisassociateNSBox(m_cocoaNSView); + DisassociateNSBox(GetNSBox()); } void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const