]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/app.cpp
don't use wxControlContainer if wxHAS_NATIVE_TAB_TRAVERSAL is defined (currently...
[wxWidgets.git] / src / mac / carbon / app.cpp
index 8c52e9f221d625a17794475f4ecd4d42b9a3760c..ec3b13491db7072b9617971dc61d5797a4ddece0 100644 (file)
@@ -451,16 +451,16 @@ wxMenu* wxFindMenuFromMacCommand( const HICommand &command , wxMenuItem* &item )
         id = wxMacCommandToId( command.commandID ) ;
         // make sure it is one of our own menus, or of the 'synthetic' apple and help menus , otherwise don't touch
         MenuItemIndex firstUserHelpMenuItem ;
-        static MenuHandle mh = NULL ;
-        if ( mh == NULL )
+        static MenuHandle helpMenuHandle = NULL ;
+        if ( helpMenuHandle == NULL )
         {
-            if ( UMAGetHelpMenu( &mh , &firstUserHelpMenuItem) != noErr )
-                mh = NULL ;
+            if ( UMAGetHelpMenuDontCreate( &helpMenuHandle , &firstUserHelpMenuItem) != noErr )
+                helpMenuHandle = NULL ;
         }
 
         // is it part of the application or the Help menu, then look for the id directly
         if ( ( GetMenuHandle( kwxMacAppleMenuId ) != NULL && command.menu.menuRef == GetMenuHandle( kwxMacAppleMenuId ) ) ||
-             ( mh != NULL && command.menu.menuRef == mh ) )
+             ( helpMenuHandle != NULL && command.menu.menuRef == helpMenuHandle ) )
         {
             wxMenuBar* mbar = wxMenuBar::MacGetInstalledMenuBar() ;
             if ( mbar )
@@ -1586,7 +1586,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers
         wxWindow* focus = wxFindWinFromMacWindow( FrontWindow() ) ;
         if ( focus )
         {
-            if ( keyval == WXK_RETURN )
+            if ( keyval == WXK_RETURN || keyval == WXK_NUMPAD_ENTER )
             {
                 wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(focus), wxTopLevelWindow);
                 if ( tlw && tlw->GetDefaultItem() )