X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd05f81195970bf616de0a053cb358fdffd7d34a..09155be84e2240da3977cf3629c42d412177a570:/src/mac/carbon/menu.cpp diff --git a/src/mac/carbon/menu.cpp b/src/mac/carbon/menu.cpp index c99c5c89ff..cb3ae485a8 100644 --- a/src/mac/carbon/menu.cpp +++ b/src/mac/carbon/menu.cpp @@ -504,10 +504,23 @@ void wxMenuBar::MacInstallMenuBar() wxStAppResource resload ; - MenuBarHandle menubar = NewHandleClear( sizeof( MenuBarHeader ) ) ; + MenuBarHandle menubar = NULL ; +#if TARGET_API_MAC_OSX + menubar = NewHandleClear( 6 /* sizeof( MenuBarHeader ) */ ) ; +#else + menubar = NewHandleClear( 12 ) ; + (*menubar)[3] = 0x0a ; +#endif ::SetMenuBar( menubar ) ; DisposeMenuBar( menubar ) ; - + MenuHandle appleMenu = NULL ; + char appleMenuTitle[3] = { 01 , kMenuAppleLogoFilledGlyph , 0 } ; + + verify_noerr( CreateNewMenu( kwxMacAppleMenuId , 0 , &appleMenu ) ) ; + verify_noerr( SetMenuTitle( appleMenu , (ConstStr255Param) appleMenuTitle ) ); + MacInsertMenuItem( appleMenu , "\pAbout..." , 0 ) ; + MacInsertMenu( appleMenu , 0 ) ; + // clean-up the help menu before adding new items MenuHandle mh = NULL ; if ( UMAGetHelpMenu( &mh , &firstUserHelpMenuItem) == noErr )