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
This commit is contained in:
Vadim Zeitlin 2010-11-10 13:52:22 +00:00
parent 357f4c818d
commit 7822ffb1de
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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)
{