Mac: Fix bugs when user chooses Quit from menubar icon menu and then cancels in confirmation dialog.

svn path=/trunk/boinc/; revision=13001
This commit is contained in:
Charlie Fenton 2007-06-24 09:24:52 +00:00
parent b77756c7c0
commit dbfb00570e
3 changed files with 19 additions and 2 deletions

View File

@ -6622,3 +6622,12 @@ Charlie 23 June 2007
cs_statefile.C
lib/
filesys.C
Charlie 24 June 2007
Mac: Fix bugs when user chooses Quit from menubar icon menu and
then cancels in confirmation dialog.
clientgui/
BOINCTaskBar.cpp
mac/
MacSysMenu.cpp

View File

@ -277,7 +277,10 @@ void CTaskBarIcon::OnAbout(wxCommandEvent& WXUNUSED(event)) {
void CTaskBarIcon::OnExit(wxCommandEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CTaskBarIcon::OnExit - Function Begin"));
if (wxGetApp().ConfirmExit()) {
#ifndef __WXMAC__
if (wxGetApp().ConfirmExit())
#endif
{
wxCloseEvent eventClose;
OnClose(eventClose);
if (eventClose.GetSkipped()) event.Skip();

View File

@ -314,7 +314,12 @@ pascal OSStatus SysMenuEventHandler( EventHandlerCallRef inHandlerCallRef,
commandID = wxID_PREFERENCES;
break;
case kHICommandQuit:
if (wxGetApp().ConfirmExit()) {
commandID = wxID_EXIT;
} else {
commandID = 0;
return noErr;
}
break;
}