diff --git a/checkin_notes b/checkin_notes index b3c91d0e98..b55ef17a73 100644 --- a/checkin_notes +++ b/checkin_notes @@ -8894,3 +8894,10 @@ Rom & Charlie 29 Oct 2008 BOINCx64.ism win_build/ sim.vcproj + +Charlie 30 Oct 2008 + - MGR: Fix show / hide on Mac broken by previous changes. + + clientgui/ + BOINCBaseFrame.cpp, .h + BOINCGUIApp.cpp diff --git a/clientgui/BOINCBaseFrame.cpp b/clientgui/BOINCBaseFrame.cpp index c7c7277795..bc6bf64155 100644 --- a/clientgui/BOINCBaseFrame.cpp +++ b/clientgui/BOINCBaseFrame.cpp @@ -757,7 +757,7 @@ bool CBOINCBaseFrame::RestoreState() { return true; } -/* + bool CBOINCBaseFrame::Show(bool bShow) { if (bShow) { wxGetApp().ShowApplication(true); @@ -768,9 +768,8 @@ bool CBOINCBaseFrame::Show(bool bShow) { } } } - return wxFrame::Show(show); + return wxFrame::Show(bShow); } -*/ int CBOINCBaseFrame::_GetCurrentViewPage() { diff --git a/clientgui/BOINCBaseFrame.h b/clientgui/BOINCBaseFrame.h index b52ded7b9a..0dfd71001f 100644 --- a/clientgui/BOINCBaseFrame.h +++ b/clientgui/BOINCBaseFrame.h @@ -91,7 +91,7 @@ public: void ExecuteBrowserLink( const wxString& strLink ); - //bool Show( bool bShow = true ); + bool Show( bool bShow = true ); protected: diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index dade2ca69d..af047e704e 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -746,6 +746,7 @@ void CBOINCGUIApp::FireReloadSkin() { bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) { CBOINCBaseFrame* pNewFrame = NULL; + CBOINCBaseFrame* pOldFrame = m_pFrame; // Create the new window if ((iGUISelection != m_iGUISelected) || !m_pFrame) { @@ -774,18 +775,18 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) { if (pNewFrame) { SetTopWindow(pNewFrame); + // Store the new frame for future use + m_pFrame = pNewFrame; + // Hide the old one if it exists - if (m_pFrame) m_pFrame->Hide(); + if (pOldFrame) pOldFrame->Hide(); // Show the new frame if needed, and prevent Mac OSX from // hiding the application if (pNewFrame && bShowWindow) pNewFrame->Show(); // Delete the old one if it exists - if (m_pFrame) m_pFrame->Destroy(); - - // Store the new frame for future use - m_pFrame = pNewFrame; + if (pOldFrame) pOldFrame->Destroy(); } } @@ -889,18 +890,19 @@ bool CBOINCGUIApp::IsApplicationVisible() { /// @param bShow /// true will show the process, false will hide the process. /// +#ifdef __WXMAC__ void CBOINCGUIApp::ShowApplication(bool bShow) { -#ifndef __WXMAC__ - bool b = bShow; - b = true; -#else if (bShow) { SetFrontProcess(&m_psnCurrentProcess); } else { ShowHideProcess(&m_psnCurrentProcess, false); } -#endif } +#else +void CBOINCGUIApp::ShowApplication(bool) { +} +#endif + bool CBOINCGUIApp::IsModalDialogDisplayed() { if (m_bSafeMessageBoxDisplayed) return true;