X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc26010927f5bb12825a32487949d063e6c605fc..4776c0b783a9776f94b049aecdc253d379686b6b:/src/common/tbarbase.cpp diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index 40a01e7b2a..94d015f155 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -61,7 +61,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBarToolBase, wxObject) wxToolBarToolBase::~wxToolBarToolBase() { +#if wxUSE_MENUS delete m_dropdownMenu; +#endif + if ( IsControl() ) GetControl()->Destroy(); } @@ -121,11 +124,13 @@ bool wxToolBarToolBase::SetLongHelp(const wxString& help) } +#if wxUSE_MENUS void wxToolBarToolBase::SetDropdownMenu(wxMenu* menu) { delete m_dropdownMenu; m_dropdownMenu = menu; } +#endif // ---------------------------------------------------------------------------- @@ -454,8 +459,7 @@ bool wxToolBarBase::Realize() if ( m_tools.empty() ) return false; - // make sure tool size is larger enough for all all bitmaps to fit in - // (this is consistent with what other ports do): + // make sure tool size is large enough for all bitmaps to fit in AdjustToolBitmapSize(); return true; @@ -730,6 +734,7 @@ void wxToolBarBase::UpdateWindowUI(long flags) } } +#if wxUSE_MENUS bool wxToolBarBase::SetDropdownMenu(int toolid, wxMenu* menu) { wxToolBarToolBase * const tool = FindById(toolid); @@ -742,6 +747,7 @@ bool wxToolBarBase::SetDropdownMenu(int toolid, wxMenu* menu) return true; } +#endif #if WXWIN_COMPATIBILITY_2_8