Mac MGR: don't show exit confirmation dialog if shutting down or restarting system

svn path=/trunk/boinc/; revision=19646
This commit is contained in:
Charlie Fenton 2009-11-19 10:13:24 +00:00
parent a8a393b2ef
commit 1ed1ed95f2
2 changed files with 16 additions and 20 deletions

View File

@ -9363,3 +9363,10 @@ Charlie 18 Nov 2009
mac_build/
boinc.xcodeproj/
project.pbxproj
Charlie 19 Nov 2009
- Mac MGR: fix bug - don't show exit confirmation dialog if shutting
down or restarting system.
clientgui/
BOINCGUIApp.cpp

View File

@ -72,8 +72,7 @@ bool s_bSkipExitConfirmation = false;
OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon ) {
DescType senderType;
Size actualSize;
ProcessSerialNumber SenderPSN, ourPSN;
Boolean isSame;
ProcessSerialNumber SenderPSN;
ProcessInfoRec pInfo;
FSSpec fileSpec;
OSStatus anErr;
@ -89,14 +88,6 @@ OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt
&senderType, &SenderPSN, sizeof(SenderPSN), &actualSize);
if (anErr == noErr) {
GetCurrentProcess(&ourPSN);
anErr = SameProcess(&SenderPSN, &ourPSN, &isSame);
if (anErr == noErr) {
if (!isSame) {
pInfo.processInfoLength = sizeof( ProcessInfoRec );
pInfo.processName = NULL;
pInfo.processAppSpec = &fileSpec;
@ -104,13 +95,11 @@ OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt
anErr = GetProcessInformation(&SenderPSN, &pInfo);
// Consider a Quit command from our Dock menu as coming from this application
if (pInfo.processSignature != 'dock') {
if ( (pInfo.processSignature != 'dock') && (pInfo.processSignature != 'BNC!') ) {
s_bSkipExitConfirmation = true; // Not from our app, our dock icon or our taskbar icon
wxGetApp().ExitMainLoop(); // Prevents wxMac from issuing events to closed frames
}
}
}
}
return wxGetApp().MacHandleAEQuit((AppleEvent*)appleEvt, reply);
}