--- np2/macosx/np2.cpp 2003/10/24 19:19:58 1.16 +++ np2/macosx/np2.cpp 2003/10/25 09:08:24 1.18 @@ -3,6 +3,7 @@ #include "strres.h" #include "np2.h" #include "dosio.h" +#include "commng.h" #include "scrnmng.h" #include "soundmng.h" #include "sysmng.h" @@ -169,6 +170,11 @@ static void HandleMenuChoice(long wParam newhdddisk(); break; #endif + + case IDM_FONT: + dialog_font(); + break; + case IDM_EXIT: np2running = FALSE; break; @@ -716,6 +722,7 @@ int main(int argc, char *argv[]) { return(0); } + commng_initialize(); sysmng_initialize(); mackbd_initialize(); pccore_init(); @@ -975,9 +982,9 @@ static pascal OSStatus np2windowevent(Ev break; case kEventRawKeyDown: if (modif & cmdKey) { - char para; - GetEventParameter (event, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, ¶); - HandleMenuChoice(MenuKey(para)); + EventRecord eve; + ConvertEventRefToEventRecord( event,&eve ); + HandleMenuChoice(MenuEvent(&eve)); } else { mackbd_f12down(key); @@ -1031,10 +1038,10 @@ static void setUpCarbonEvent(void) { InstallStandardEventHandler(GetWindowEventTarget(hWndMain)); InstallApplicationEventHandler(NewEventHandlerUPP(np2appevent), - sizeof(appEventList)/sizeof(EventTypeSpec), + GetEventTypeCount(appEventList), appEventList, 0, NULL); InstallWindowEventHandler(hWndMain, NewEventHandlerUPP(np2windowevent), - sizeof(windEventList)/sizeof(EventTypeSpec), + GetEventTypeCount(windEventList), windEventList, 0, NULL); }