]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/auibar.cpp
Fix wxEncodingConverter::Convert(wchar_t) documentation.
[wxWidgets.git] / src / aui / auibar.cpp
index fab0b5d247dee247816df60a5efa7d4333ca4de7..d9bb3046b4f268011a79b517ef8901aac82b2880 100644 (file)
@@ -655,14 +655,13 @@ void wxAuiDefaultToolBarArt::DrawGripper(wxDC& dc,
 }
 
 void wxAuiDefaultToolBarArt::DrawOverflowButton(wxDC& dc,
-                                          wxWindow* wnd,
+                                          wxWindow* /*wnd*/,
                                           const wxRect& rect,
                                           int state)
 {
     if (state & wxAUI_BUTTON_STATE_HOVER ||
         state & wxAUI_BUTTON_STATE_PRESSED)
     {
-        wxRect cli_rect = wnd->GetClientRect();
         wxColor light_gray_bg = m_highlightColour.ChangeLightness(170);
 
         if (m_flags & wxAUI_TB_VERTICAL)
@@ -1665,8 +1664,9 @@ wxSize wxAuiToolBar::GetHintSize(int dock_direction) const
         case wxAUI_DOCK_LEFT:
             return m_vertHintSize;
         default:
-            wxCHECK_MSG(false, wxDefaultSize, "invalid dock location value");
+            wxFAIL_MSG("invalid dock location value");
     }
+    return wxDefaultSize;
 }
 
 bool wxAuiToolBar::IsPaneValid(const wxAuiPaneInfo& pane) const
@@ -2150,7 +2150,7 @@ void wxAuiToolBar::DoIdleUpdate()
             {
                 bool is_enabled;
                 if (item.m_window)
-                    is_enabled = item.m_window->IsEnabled();
+                    is_enabled = item.m_window->IsThisEnabled();
                 else
                     is_enabled = (item.m_state & wxAUI_BUTTON_STATE_DISABLED) ? false : true;
 
@@ -2338,11 +2338,19 @@ void wxAuiToolBar::OnIdle(wxIdleEvent& evt)
             }
         }
     }
-
-    DoIdleUpdate();
     evt.Skip();
 }
 
+void wxAuiToolBar::UpdateWindowUI(long flags)
+{
+    if ( flags & wxUPDATE_UI_FROMIDLE )
+    {
+        DoIdleUpdate();
+    }
+
+    wxControl::UpdateWindowUI(flags);
+}
+
 void wxAuiToolBar::OnPaint(wxPaintEvent& WXUNUSED(evt))
 {
     wxAutoBufferedPaintDC dc(this);
@@ -2679,15 +2687,12 @@ void wxAuiToolBar::OnRightUp(wxMouseEvent& evt)
 
     if (m_actionItem && hitItem == m_actionItem)
     {
-        if (hitItem->m_kind == wxITEM_NORMAL)
-        {
-            wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, m_actionItem->m_toolId);
-            e.SetEventObject(this);
-            e.SetToolId(m_actionItem->m_toolId);
-            e.SetClickPoint(m_actionPos);
-            GetEventHandler()->ProcessEvent(e);
-            DoIdleUpdate();
-        }
+        wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, m_actionItem->m_toolId);
+        e.SetEventObject(this);
+        e.SetToolId(m_actionItem->m_toolId);
+        e.SetClickPoint(m_actionPos);
+        GetEventHandler()->ProcessEvent(e);
+        DoIdleUpdate();
     }
     else
     {