From cff3b0e63a9486ba7ed500f57cef382b8c5e5cda Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 14 Apr 2006 10:41:31 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=9900 --- checkin_notes | 9 +++++++++ clientgui/MainFrame.cpp | 16 ++++++++++++---- clientgui/MainFrame.h | 1 + 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index a647a46ed4..804b0b27b3 100755 --- a/checkin_notes +++ b/checkin_notes @@ -3822,3 +3822,12 @@ Rom 13 Apr 2006 clientgui/ BOINCGUIApp.cpp + +Charlie 14 Apr 2006 + - Mac: OnShow() is not implemented in wxMac-2.6.2, so move code from + CMainFrame::OnShow() into new method CMainFrame::GetWindowDimensions(). + Call GetWindowDimensions() from CMainFrame::OnShow() and also from + Mac-only method CMainFrame::Show(). + + clientgui/ + MainFrame.cpp, .h diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index c81ae7b001..b5d119dadc 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -1500,9 +1500,19 @@ void CMainFrame::OnClose(wxCloseEvent& event) { void CMainFrame::OnShow(wxShowEvent& event) { wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnShow - Function Begin")); + + if (event.GetShow()) + GetWindowDimensions(); + + event.Skip(); + wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnShow - Function End")); +} + + +void CMainFrame::GetWindowDimensions() { static bool bFirstTime = true; - if (bFirstTime && event.GetShow()) { + if (bFirstTime) { bFirstTime = false; wxString strBaseConfigLocation = wxString(wxT("/")); @@ -1564,9 +1574,6 @@ void CMainFrame::OnShow(wxShowEvent& event) { Maximize(bWindowMaximized); #endif } - - event.Skip(); - wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnShow - Function End")); } @@ -2148,6 +2155,7 @@ bool CMainFrame::Show(bool show) { GetCurrentProcess(&psn); if (show) { SetFrontProcess(&psn); // Shows process if hidden + GetWindowDimensions(); } else if (IsProcessVisible(&psn)) ShowHideProcess(&psn, false); diff --git a/clientgui/MainFrame.h b/clientgui/MainFrame.h index 085d7b24d4..08093bd5df 100644 --- a/clientgui/MainFrame.h +++ b/clientgui/MainFrame.h @@ -88,6 +88,7 @@ public: void OnClose( wxCloseEvent& event ); void OnShow( wxShowEvent& event ); + void GetWindowDimensions(); void OnRefreshState( wxTimerEvent& event ); void OnFrameRender( wxTimerEvent& event );