diff --git a/checkin_notes b/checkin_notes index a3e5c9fd5d..f651d2d242 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4351,3 +4351,10 @@ Rom 1 May 2006 boinc_ss.vcproj boincmgr_curl.vcproj libboinc.vcproj + +Charlie 1 May 2006 + - Mac: Fix bugs when linking with wxMac-2.6.3. + + clientgui/ + mac/ + MacSysMenu.cpp diff --git a/clientgui/mac/MacSysMenu.cpp b/clientgui/mac/MacSysMenu.cpp index 6bc81e9d64..73c4bdb95a 100644 --- a/clientgui/mac/MacSysMenu.cpp +++ b/clientgui/mac/MacSysMenu.cpp @@ -170,6 +170,20 @@ pascal OSStatus SysMenuEventHandler( EventHandlerCallRef inHandlerCallRef, pMSM = wxGetApp().GetMacSystemMenu(); + // wxMac-2.6.3 "helpfully" converts wxID_ABOUT to kHICommandAbout, wxID_EXIT to kHICommandQuit, + // wxID_PREFERENCES to kHICommandPreferences + switch (commandID) { + case kHICommandAbout: + commandID = wxID_ABOUT; + break; + case kHICommandPreferences: + commandID = wxID_PREFERENCES; + break; + case kHICommandQuit: + commandID = wxID_EXIT; + break; + } + if (commandID == wxID_ABOUT) pMSM->SetOpeningAboutDlg(true); @@ -183,7 +197,7 @@ pascal OSStatus SysMenuEventHandler( EventHandlerCallRef inHandlerCallRef, baseMenu = (pMSM->GetCurrentMenu()); baseMenuRef = (MenuRef)(baseMenu->GetHMenu()); - err = GetIndMenuItemWithCommandID(baseMenuRef, commandID, 1, NULL, &menuItemIndex); + err = GetIndMenuItemWithCommandID(baseMenuRef, command.commandID, 1, NULL, &menuItemIndex); if (err) return eventNotHandledErr; // Command not found in our menu