]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix wxRibbon compilation when wxUSE_TOOLTIPS==0.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 4 Jan 2012 13:39:23 +0000 (13:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 4 Jan 2012 13:39:23 +0000 (13:39 +0000)
Add wxUSE_TOOLTIPS tests after the changes of r70175.

Closes #13827.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/ribbon/buttonbar.cpp
src/ribbon/toolbar.cpp

index 3e73865a017e571f548fd6d1c50eb45d85ecedea..ad44278f146d2e79928424b4ec768fae0c725e07 100644 (file)
@@ -977,10 +977,12 @@ void wxRibbonButtonBar::OnMouseMove(wxMouseEvent& evt)
         }
     }
 
+#if wxUSE_TOOLTIPS
     if(new_hovered == NULL && GetToolTip())
     {
         UnsetToolTip();
     }
+#endif
 
     if(new_hovered != m_hovered_button || (m_hovered_button != NULL &&
         new_hovered_state != m_hovered_button->base->state))
@@ -993,7 +995,9 @@ void wxRibbonButtonBar::OnMouseMove(wxMouseEvent& evt)
         if(m_hovered_button != NULL)
         {
             m_hovered_button->base->state = new_hovered_state;
+#if wxUSE_TOOLTIPS
             SetToolTip(m_hovered_button->base->help_string);
+#endif
         }
         Refresh(false);
     }
index 95afe6039671173cc6669b743e180581b42cc3ff..12826d1eaea41915158c5276f0252735d80b30d5 100644 (file)
@@ -581,6 +581,7 @@ void wxRibbonToolBar::OnMouseMove(wxMouseEvent& evt)
         }
     }
 
+#if wxUSE_TOOLTIPS
     if(new_hover)
     {
         SetToolTip(new_hover->help_string);
@@ -589,6 +590,7 @@ void wxRibbonToolBar::OnMouseMove(wxMouseEvent& evt)
     {
         UnsetToolTip();
     }
+#endif
 
     if(new_hover != m_hover_tool)
     {