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:
@@ -2739,8 +2739,10 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event )
|
|||||||
else
|
else
|
||||||
#endif // __WXDEBUG__
|
#endif // __WXDEBUG__
|
||||||
{
|
{
|
||||||
|
#if wxUSE_MSGDLG
|
||||||
// just Ctrl-Alt-middle click shows information about wx version
|
// just Ctrl-Alt-middle click shows information about wx version
|
||||||
::wxInfoMessageBox((wxWindow*)this);
|
::wxInfoMessageBox((wxWindow*)this);
|
||||||
|
#endif // wxUSE_MSGDLG
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -398,6 +398,7 @@ wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win,
|
|||||||
|
|
||||||
// truncate and add an ellipsis (...) if the text is too wide.
|
// truncate and add an ellipsis (...) if the text is too wide.
|
||||||
const int availWidth = rect.width - labelWidth;
|
const int availWidth = rect.width - labelWidth;
|
||||||
|
#if wxUSE_CONTROLS
|
||||||
if ( tw > availWidth )
|
if ( tw > availWidth )
|
||||||
{
|
{
|
||||||
label = wxControl::Ellipsize(label,
|
label = wxControl::Ellipsize(label,
|
||||||
@@ -408,6 +409,7 @@ wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win,
|
|||||||
tw = dc.GetTextExtent(label).x;
|
tw = dc.GetTextExtent(label).x;
|
||||||
}
|
}
|
||||||
else // enough space, we can respect alignment
|
else // enough space, we can respect alignment
|
||||||
|
#endif // wxUSE_CONTROLS
|
||||||
{
|
{
|
||||||
switch (params->m_labelAlignment)
|
switch (params->m_labelAlignment)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user