From 6a317e61887db770025fc6c642c2105f1cefe3ac Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 14 Mar 2002 23:55:16 +0000 Subject: [PATCH] compilation fixes for !wxUSE_TOOLBAR git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/framuniv.cpp | 13 ++++++++----- src/univ/toolbar.cpp | 4 ++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/univ/framuniv.cpp b/src/univ/framuniv.cpp index 727b476ace..d4c06aa36b 100644 --- a/src/univ/framuniv.cpp +++ b/src/univ/framuniv.cpp @@ -98,16 +98,19 @@ void wxFrame::PositionMenuBar() wxCoord heightMbar = m_frameMenuBar->GetSize().y; wxCoord heightTbar = 0; - if (m_frameToolBar) - heightTbar = m_frameToolBar->GetSize().y; - m_frameMenuBar->SetSize(0, +#if wxUSE_TOOLBAR + if ( m_frameToolBar ) + heightTbar = m_frameToolBar->GetSize().y; +#endif // wxUSE_TOOLBAR + + m_frameMenuBar->SetSize(0, #ifdef __WXPM__ // FIXME -- remove this, make wxOS2/Univ behave as // the rest of the world!!! GetClientSize().y - heightMbar - heightTbar, #else - (heightMbar + heightTbar), -#endif +#endif GetClientSize().x, heightMbar); } } @@ -304,7 +307,7 @@ int wxFrame::GetMinHeight() const height += m_frameStatusBar->GetSize().y; } #endif // wxUSE_STATUSBAR - + if ( height ) return height + wxMax(0, wxFrameBase::GetMinHeight()); else diff --git a/src/univ/toolbar.cpp b/src/univ/toolbar.cpp index 774c5d5a75..e17794b8ce 100644 --- a/src/univ/toolbar.cpp +++ b/src/univ/toolbar.cpp @@ -29,6 +29,8 @@ #pragma hdrstop #endif +#if wxUSE_TOOLBAR + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/app.h" @@ -705,3 +707,5 @@ bool wxStdToolbarInputHandler::HandleActivation(wxInputConsumer *consumer, return TRUE; } +#endif // wxUSE_TOOLBAR +