From 523a3dfe5590556bd494d537135b39cf6b7eba4a Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 25 May 2005 03:36:16 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=6245 --- clientgui/MainFrame.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index 4e12535255..51efbe1468 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -1236,9 +1236,10 @@ void CMainFrame::OnRefreshState(wxTimerEvent &event) { void CMainFrame::OnFrameRender(wxTimerEvent &event) { wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnFrameRender - Function Begin")); - static bool bAlreadyRunningLoop = false; - static bool bAlreadyRunOnce = false; - CMainDocument* pDoc = wxGetApp().GetDocument(); + static bool bAlreadyRunningLoop = false; + static bool bAlreadyRunOnce = false; + static wxString strCachedStatusText = wxEmptyString; + CMainDocument* pDoc = wxGetApp().GetDocument(); if (!bAlreadyRunningLoop) { bAlreadyRunningLoop = true; @@ -1345,7 +1346,12 @@ void CMainFrame::OnFrameRender(wxTimerEvent &event) { } SetTitle(strTitle); - m_pStatusbar->m_ptxtConnected->SetLabel(strStatusText); + // The Mac takes a huge performance hit changing the text of a floating + // window, so don't change the text unless we really have too. + if (strStatusText != strCachedStatusText) { + strCachedStatusText = strStatusText; + m_pStatusbar->m_ptxtConnected->SetLabel(strStatusText); + } } else { m_pStatusbar->m_pbmpConnected->Hide(); m_pStatusbar->m_ptxtConnected->Hide();