X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c41a418df66b66711eba536526a3085f690782e..ce52ac88bc9e689db478bbe86c3559ad1edc5959:/src/common/framecmn.cpp diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 591382e187..af39670bd7 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -19,33 +19,32 @@ #include "wx/menu.h" #include "wx/menuitem.h" -#ifndef __WXGTK__ void wxFrame::OnIdle(wxIdleEvent& WXUNUSED(event) ) { - DoMenuUpdates(); + DoMenuUpdates(); } -#endif // update all menus void wxFrame::DoMenuUpdates() { - wxMenuBar* bar = GetMenuBar(); + wxMenuBar* bar = GetMenuBar(); - if ( bar != NULL ) { - int nCount = bar->GetMenuCount(); - for (int n = 0; n < nCount; n++) - DoMenuUpdates(bar->GetMenu(n), (wxWindow*) NULL); - } + if ( bar != NULL ) + { + int nCount = bar->GetMenuCount(); + for (int n = 0; n < nCount; n++) + DoMenuUpdates(bar->GetMenu(n), (wxWindow*) NULL); + } } // update a menu and all submenus recursively void wxFrame::DoMenuUpdates(wxMenu* menu, wxWindow* WXUNUSED(focusWin)) { wxEvtHandler* evtHandler = GetEventHandler(); - wxNode* node = menu->GetItems().First(); + wxMenuItemList::Node* node = menu->GetMenuItems().GetFirst(); while (node) { - wxMenuItem* item = (wxMenuItem*) node->Data(); + wxMenuItem* item = node->GetData(); if ( !item->IsSeparator() ) { wxWindowID id = item->GetId(); @@ -65,6 +64,6 @@ void wxFrame::DoMenuUpdates(wxMenu* menu, wxWindow* WXUNUSED(focusWin)) if (item->GetSubMenu()) DoMenuUpdates(item->GetSubMenu(), (wxWindow*) NULL); } - node = node->Next(); + node = node->GetNext(); } }