mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=11397
This commit is contained in:
parent
596f7343cb
commit
6629e9a22c
|
@ -11760,6 +11760,8 @@ Rom 29 Oct 2006
|
|||
|
||||
Charlie 29 Oct 2006
|
||||
- Mac: fix some Mac-specific Simple GUI bugs.
|
||||
- Mac: Don't run confirmation dialog on QUIT AppleEvent so dialog
|
||||
doesn't prevent logout / shutdown.
|
||||
|
||||
clientgui/
|
||||
AdvancedFrame.cpp, h
|
||||
|
|
|
@ -1048,6 +1048,14 @@ void CAdvancedFrame::OnCloseWindow(wxCommandEvent& WXUNUSED(event)) {
|
|||
void CAdvancedFrame::OnExit(wxCommandEvent& WXUNUSED(event)) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnExit - Function Begin"));
|
||||
|
||||
#ifdef __WXMAC__
|
||||
// Don't run confirmation dialog if logging out or shutting down
|
||||
if (wxGetApp().GetQuittingByAppleEvent()) {
|
||||
Close(true);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_iDisplayExitWarning) {
|
||||
CDlgGenericMessage* pDlg = new CDlgGenericMessage(this);
|
||||
wxString strMessage = wxGetApp().GetSkinManager()->GetAdvanced()->GetExitMessage();
|
||||
|
|
|
@ -563,7 +563,7 @@ bool CBOINCBaseFrame::Show(bool show) {
|
|||
SetFrontProcess(&psn); // Shows process if hidden
|
||||
} else {
|
||||
// GetWindowDimensions();
|
||||
if (wxGetApp().GetCurrentGUISelection() == m_windowType)
|
||||
if (wxGetApp().GetCurrentGUISelection() == m_iWindowType)
|
||||
if (IsProcessVisible(&psn))
|
||||
ShowHideProcess(&psn, false);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
|
||||
#ifdef __WXMAC__
|
||||
bool Show( bool show = true );
|
||||
int m_windowType; // BOINC_SIMPLEGUI or BOINC_ADVANCEDGUI
|
||||
int m_iWindowType; // BOINC_SIMPLEGUI or BOINC_ADVANCEDGUI
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
#include "sg_BoincSimpleGUI.h"
|
||||
#endif
|
||||
|
||||
static bool s_bQuittingByAppleEvent;
|
||||
|
||||
#ifdef __WXMSW__
|
||||
EXTERN_C BOOL IsBOINCServiceInstalled();
|
||||
|
@ -297,6 +298,9 @@ bool CBOINCGUIApp::OnInit() {
|
|||
StartupBOINCCore();
|
||||
|
||||
#ifdef __WXMAC__
|
||||
s_bQuittingByAppleEvent = false;
|
||||
AEInstallEventHandler( kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP((AEEventHandlerProcPtr)QuitAppleEventHandler), 0, false );
|
||||
|
||||
m_pMacSystemMenu = new CMacSystemMenu(
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationName(),
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationIcon(),
|
||||
|
@ -791,6 +795,16 @@ void CBOINCGUIApp::ShutdownBOINCCore() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
OSErr CBOINCGUIApp::QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon ) {
|
||||
s_bQuittingByAppleEvent = true;
|
||||
return wxGetApp().MacHandleAEQuit((AppleEvent*)appleEvt, reply);
|
||||
}
|
||||
|
||||
bool CBOINCGUIApp::GetQuittingByAppleEvent() {
|
||||
return s_bQuittingByAppleEvent;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void CBOINCGUIApp::ShutdownBOINCCore() {
|
||||
|
@ -944,7 +958,7 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
|
|||
|
||||
#ifdef __WXMAC__
|
||||
// So closing old view doesn't hide application
|
||||
pNewFrame->m_windowType = iGUISelection;
|
||||
pNewFrame->m_iWindowType = iGUISelection;
|
||||
m_iGUISelected = iGUISelection;
|
||||
#endif
|
||||
// Delete the old one if it exists
|
||||
|
|
|
@ -72,6 +72,7 @@ protected:
|
|||
CTaskBarIcon* m_pTaskBarIcon;
|
||||
#ifdef __WXMAC__
|
||||
CMacSystemMenu* m_pMacSystemMenu;
|
||||
static OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon );
|
||||
#endif
|
||||
|
||||
bool m_bBOINCStartedByManager;
|
||||
|
@ -114,6 +115,7 @@ public:
|
|||
#ifdef __WXMAC__
|
||||
CMacSystemMenu* GetMacSystemMenu() { return m_pMacSystemMenu; }
|
||||
int GetCurrentGUISelection() { return m_iGUISelected; }
|
||||
bool GetQuittingByAppleEvent();
|
||||
#endif
|
||||
|
||||
wxArrayString& GetSupportedLanguages() { return m_astrLanguages; }
|
||||
|
|
Loading…
Reference in New Issue