X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1673e527f08395de6864b09540162ca409a3c28..069b2e594107028ef3ee0a03b8b9fd13b0fa4f32:/src/mac/carbon/menu.cpp diff --git a/src/mac/carbon/menu.cpp b/src/mac/carbon/menu.cpp index 0635f895d9..bc16a338c5 100644 --- a/src/mac/carbon/menu.cpp +++ b/src/mac/carbon/menu.cpp @@ -374,13 +374,13 @@ bool wxMenu::ProcessCommand(wxCommandEvent & event) // Try the menu's event handler if ( /* !processed && */ GetEventHandler()) - processed = GetEventHandler()->ProcessEvent(event); + processed = GetEventHandler()->SafelyProcessEvent(event); // Try the window the menu was popped up from // (and up through the hierarchy) wxWindow *win = GetInvokingWindow(); if ( !processed && win ) - processed = win->GetEventHandler()->ProcessEvent(event); + processed = win->HandleWindowEvent(event); return processed; } @@ -567,7 +567,7 @@ wxInt32 wxMenu::MacHandleCommandProcess( wxMenuItem* item, int id, wxWindow* tar event.SetEventObject(targetWindow); event.SetInt(item->IsCheckable() ? item->IsChecked() : -1); - if ( targetWindow->GetEventHandler()->ProcessEvent(event) ) + if ( targetWindow->HandleWindowEvent(event) ) result = noErr ; } } @@ -601,7 +601,7 @@ wxInt32 wxMenu::MacHandleCommandUpdateStatus(wxMenuItem* WXUNUSED(item), wxWindow *win = menu->GetInvokingWindow(); if ( win ) { - processed = win->GetEventHandler()->ProcessEvent(event); + processed = win->HandleWindowEvent(event); break; } @@ -611,7 +611,7 @@ wxInt32 wxMenu::MacHandleCommandUpdateStatus(wxMenuItem* WXUNUSED(item), if ( !processed && targetWindow != NULL) { - processed = targetWindow->GetEventHandler()->ProcessEvent(event); + processed = targetWindow->HandleWindowEvent(event); } if ( processed ) @@ -864,7 +864,7 @@ void wxMenuBar::MacInstallMenuBar() } else { - UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , m_titles[i], m_font.GetEncoding() ) ; + UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , m_titles[i], GetFont().GetEncoding() ) ; menu->MacBeforeDisplay(false) ; ::InsertMenu(MAC_WXHMENU(_wxMenuAt(m_menus, i)->GetHMenu()), 0); @@ -979,7 +979,7 @@ wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title) ::DeleteMenu( menuOld->MacGetMenuId() /* m_menus[pos]->MacGetMenuId() */ ) ; menu->MacBeforeDisplay( false ) ; - UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , m_font.GetEncoding() ) ; + UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , GetFont().GetEncoding() ) ; if ( pos == m_menus.GetCount() - 1) ::InsertMenu( MAC_WXHMENU(menu->GetHMenu()) , 0 ) ; else @@ -1002,7 +1002,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title) m_titles.Insert(title, pos); - UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , m_font.GetEncoding() ) ; + UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , GetFont().GetEncoding() ) ; if ( IsAttached() && s_macInstalledMenuBar == this ) { @@ -1054,7 +1054,7 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title) m_titles.Add(title); - UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , m_font.GetEncoding() ) ; + UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , GetFont().GetEncoding() ) ; if ( IsAttached() ) {