]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/menu.cpp
moving tlw list up, cleanup
[wxWidgets.git] / src / mac / carbon / menu.cpp
index 0635f895d9dc6851838d3d0f13a5d4c3d76feab7..bc16a338c522cccae9b7479a329f82b75307273c 100644 (file)
@@ -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() )
     {