diff --git a/checkin_notes b/checkin_notes index d5c41bdb67..753fbbf2c8 100755 --- a/checkin_notes +++ b/checkin_notes @@ -14783,6 +14783,10 @@ Rom 6 July 2004 - Reduce the total number of messages the system attempts to keep in the messages tab to 200. 2000 was a bit much and caused the system to spend some time processing when there were quite a few messages to go through, such as in Predictor@home + - Moved the code that checkes the total number of messages available in the message + tab out of the switch/case chunk of code so that it happens more frequently + than when the user clicks on the messages tab, which could take awhile if there was + more than 1000 messages. client/win/ wingui_mainwindow.cpp, .h diff --git a/client/win/wingui_mainwindow.cpp b/client/win/wingui_mainwindow.cpp index 0ada60f69d..b257b25850 100755 --- a/client/win/wingui_mainwindow.cpp +++ b/client/win/wingui_mainwindow.cpp @@ -621,19 +621,6 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) break; - case MESSAGE_ID: - - // check message pane size - n = m_MessageListCtrl.GetItemCount(); - if (n > 200) { - m_MessageListCtrl.SetRedraw(FALSE); - for (i = 0 ; i < n - 200 ; i++) - m_MessageListCtrl.DeleteItem(0); - m_MessageListCtrl.SetRedraw(TRUE); - } - - break; - case USAGE_ID: // update usage @@ -675,6 +662,15 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) } + // check message pane size, and reduce if there are too many + n = m_MessageListCtrl.GetItemCount(); + if (n > 200) { + m_MessageListCtrl.SetRedraw(FALSE); + for (i = 0 ; i < n - 200 ; i++) + m_MessageListCtrl.DeleteItem(0); + m_MessageListCtrl.SetRedraw(TRUE); + } + // make icon flash if needed TCITEM tcItem; memset(&tcItem, 0, sizeof(TCITEMW)); // start with NULL defaults