From 7822ffb1de54dbb0b89e03c3bae89a5ee91c7169 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 10 Nov 2010 13:52:22 +0000 Subject: [PATCH] Add #if checks fixing minimal wxGTK build. Check for functions availability before using them. This fixes compilation of wxGTK with all features disabled. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wincmn.cpp | 2 ++ src/generic/renderg.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 9ae19728fa..47308229a1 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -2739,8 +2739,10 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event ) else #endif // __WXDEBUG__ { +#if wxUSE_MSGDLG // just Ctrl-Alt-middle click shows information about wx version ::wxInfoMessageBox((wxWindow*)this); +#endif // wxUSE_MSGDLG } } else diff --git a/src/generic/renderg.cpp b/src/generic/renderg.cpp index 6c0ce55de4..0024bcec60 100644 --- a/src/generic/renderg.cpp +++ b/src/generic/renderg.cpp @@ -398,6 +398,7 @@ wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win, // truncate and add an ellipsis (...) if the text is too wide. const int availWidth = rect.width - labelWidth; +#if wxUSE_CONTROLS if ( tw > availWidth ) { label = wxControl::Ellipsize(label, @@ -408,6 +409,7 @@ wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win, tw = dc.GetTextExtent(label).x; } else // enough space, we can respect alignment +#endif // wxUSE_CONTROLS { switch (params->m_labelAlignment) {