]> git.saurik.com Git - wxWidgets.git/commitdiff
don't duplicate base class m_acceleratorTable as m_accelTable in wxMenuBar, this...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 3 Oct 2008 22:15:40 +0000 (22:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 3 Oct 2008 22:15:40 +0000 (22:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/menu.h
src/msw/frame.cpp
src/msw/menu.cpp

index 8262a9f1808cda4ab989df664cc4c93a96b740d8..213c9d1675fd1fba7fa59b9c9b395ef1baa92d4d 100644 (file)
@@ -183,9 +183,6 @@ public:
 #endif
 
 #if wxUSE_ACCEL
-    // get the accel table for all the menus
-    const wxAcceleratorTable& GetAccelTable() const { return m_accelTable; }
-
     // update the accel table (must be called after adding/deleting a menu)
     void RebuildAccelTable();
 #endif // wxUSE_ACCEL
@@ -213,10 +210,6 @@ protected:
     // Return the MSW position for a wxMenu which is sometimes different from
     // the wxWidgets position.
     int MSWPositionForWxMenu(wxMenu *menu, int wxpos);
-#if wxUSE_ACCEL
-    // the accelerator table for all accelerators in all our menus
-    wxAcceleratorTable m_accelTable;
-#endif // wxUSE_ACCEL
 
 #if defined(__WXWINCE__) && wxUSE_TOOLBAR
     wxToolBar*  m_toolBar;
index 76615b04fa2c73b2cb5f165e8816d08da46729b4..2477f815d82dbd1588f6245520f40b8081a1665a 100644 (file)
@@ -828,13 +828,10 @@ bool wxFrame::MSWDoTranslateMessage(wxFrame *frame, WXMSG *pMsg)
         return true;
 
 #if wxUSE_MENUS && wxUSE_ACCEL && !defined(__WXUNIVERSAL__)
-    // try the menu bar accels
+    // try the menu bar accelerators
     wxMenuBar *menuBar = GetMenuBar();
-    if ( menuBar )
-    {
-        const wxAcceleratorTable& acceleratorTable = menuBar->GetAccelTable();
-        return acceleratorTable.Translate(frame, pMsg);
-    }
+    if ( menuBar && menuBar->GetAcceleratorTable()->Translate(frame, pMsg) )
+        return true;
 #endif // wxUSE_MENUS && wxUSE_ACCEL
 
     return false;
index 3cf48b33d3974851993a0000d85b2c984b1137f7..4c929adce5048108012faf09d6199a550420c959 100644 (file)
@@ -1347,7 +1347,7 @@ void wxMenuBar::RebuildAccelTable()
             nAccelCount += (*it)->CopyAccels(&accelEntries[nAccelCount]);
         }
 
-        m_accelTable = wxAcceleratorTable(nAccelCount, accelEntries);
+        SetAcceleratorTable(wxAcceleratorTable(nAccelCount, accelEntries));
 
         delete [] accelEntries;
     }