mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=11550
This commit is contained in:
parent
869aa34aab
commit
cbc7b99053
|
@ -12692,7 +12692,10 @@ Bruce 19 Nov 2006
|
||||||
|
|
||||||
Charlie 19 Nov 2006
|
Charlie 19 Nov 2006
|
||||||
- MGR: Fix windows compile errors.
|
- MGR: Fix windows compile errors.
|
||||||
|
- Mac: Ignore Quit AppleEvents if a modal dialog is open (to prevent
|
||||||
|
crashes if the user selects Quit from the Manager's Dock menu.)
|
||||||
|
|
||||||
clientgui/
|
clientgui/
|
||||||
|
BOINCGUIApp.cpp
|
||||||
sg_ProjectsComponent.cpp
|
sg_ProjectsComponent.cpp
|
||||||
ViewMessages.cpp
|
ViewMessages.cpp
|
||||||
|
|
|
@ -805,6 +805,8 @@ OSErr CBOINCGUIApp::QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEven
|
||||||
Boolean isSame;
|
Boolean isSame;
|
||||||
ProcessInfoRec pInfo;
|
ProcessInfoRec pInfo;
|
||||||
FSSpec fileSpec;
|
FSSpec fileSpec;
|
||||||
|
WindowRef win;
|
||||||
|
WindowModality modality;
|
||||||
OSStatus anErr;
|
OSStatus anErr;
|
||||||
|
|
||||||
anErr = AEGetAttributePtr(appleEvt, keyAddressAttr, typeProcessSerialNumber,
|
anErr = AEGetAttributePtr(appleEvt, keyAddressAttr, typeProcessSerialNumber,
|
||||||
|
@ -825,6 +827,16 @@ OSErr CBOINCGUIApp::QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEven
|
||||||
|
|
||||||
anErr = GetProcessInformation(&SenderPSN, &pInfo);
|
anErr = GetProcessInformation(&SenderPSN, &pInfo);
|
||||||
|
|
||||||
|
// Refuse to quit if a modal dialog is open
|
||||||
|
win = FrontWindow();
|
||||||
|
if (win) {
|
||||||
|
GetWindowModality(win, &modality, NULL);
|
||||||
|
if (modality == kWindowModalityAppModal) {
|
||||||
|
SysBeep(4);
|
||||||
|
return userCanceledErr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Consider a Quit command from our Dock menu as coming from this application
|
// Consider a Quit command from our Dock menu as coming from this application
|
||||||
if (pInfo.processSignature != 'dock') {
|
if (pInfo.processSignature != 'dock') {
|
||||||
s_bSkipExitConfirmation = true; // Not from our app, our dock icon or our taskbar icon
|
s_bSkipExitConfirmation = true; // Not from our app, our dock icon or our taskbar icon
|
||||||
|
|
Loading…
Reference in New Issue