]> git.saurik.com Git - wxWidgets.git/commitdiff
Add #if checks fixing minimal wxGTK build.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 10 Nov 2010 13:52:22 +0000 (13:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 10 Nov 2010 13:52:22 +0000 (13:52 +0000)
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
src/generic/renderg.cpp

index 9ae19728fa75dac8c584cf64ce17327fb2546e44..47308229a1293afa3598bec6a78469cc9b8321f0 100644 (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
index 6c0ce55de44a58b374f525f7d7b084d32cf4aa8a..0024bcec60cd8ced94886f18953fe0825de68065 100644 (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)
             {