X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/84f7908b99660dc0556d9352c62ad717e679dd4d..d1017acfc30c5ee208535c2e84735d17d26b5010:/src/common/framecmn.cpp?ds=sidebyside diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index fc7b2f413a..8bc2ffb5db 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -78,6 +78,11 @@ wxFrameBase::wxFrameBase() #endif // wxUSE_STATUSBAR } +wxFrameBase::~wxFrameBase() +{ + // this destructor is required for Darwin +} + wxFrame *wxFrameBase::New(wxWindow *parent, wxWindowID id, const wxString& title, @@ -148,12 +153,13 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const wxPoint pt = wxTopLevelWindow::GetClientAreaOrigin(); #if wxUSE_TOOLBAR - if ( GetToolBar() && GetToolBar()->IsShown() ) + wxToolBar *toolbar = GetToolBar(); + if ( toolbar && toolbar->IsShown() ) { int w, h; - GetToolBar()->GetSize(& w, & h); + toolbar->GetSize(&w, &h); - if ( GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL ) + if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL ) { pt.x += w; } @@ -186,7 +192,7 @@ bool wxFrameBase::ProcessCommand(int id) { if (!item->IsEnabled()) return TRUE; - + if (item->IsCheckable()) { item->Toggle(); @@ -403,8 +409,8 @@ void wxFrameBase::AttachMenuBar(wxMenuBar *menubar) { if ( menubar ) { - m_frameMenuBar = menubar; menubar->Attach((wxFrame *)this); + m_frameMenuBar = menubar; } }