diff --git a/checkin_notes b/checkin_notes index 26e85fda6a..65164ec8f6 100755 --- a/checkin_notes +++ b/checkin_notes @@ -13793,3 +13793,9 @@ Bruce 20 Nov 2005 inc/ db_ops.inc +Rom 21 Nov 2005 + - Remove the alert block of code in MainDocument.cpp since it is + now dead code anyway. + + clientgui/ + MainDocument.cpp diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index d57872a820..56bf910a9a 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -837,55 +837,20 @@ int CMainDocument::WorkAbort(int iIndex) { int CMainDocument::CachedMessageUpdate() { int retval; static bool in_this_func = false; - int new_msg_seqno = m_iMessageSequenceNumber; if (in_this_func) return 0; in_this_func = true; if (IsConnected()) { - CMainFrame* pFrame = wxGetApp().GetFrame(); - MESSAGES new_msgs; - - wxASSERT(pFrame); - wxASSERT(wxDynamicCast(pFrame, CMainFrame)); - - retval = rpc.get_messages(m_iMessageSequenceNumber, new_msgs); + retval = rpc.get_messages(m_iMessageSequenceNumber, messages); if (retval) { wxLogTrace(wxT("Function Status"), "CMainDocument::CachedMessageUpdate - Get Messages Failed '%d'", retval); m_pNetworkConnection->SetStateDisconnected(); goto done; } - std::vector::iterator mi = new_msgs.messages.begin(); - while (mi != new_msgs.messages.end()) { - MESSAGE* mp = *mi; - new_msg_seqno = mp->seqno; - switch(mp->priority) { - case MSG_PRIORITY_ALERT_ERROR: - if (m_iMessageSequenceNumber) { - pFrame->ShowAlert( - _("BOINC error"), - mp->body.c_str(), - wxICON_ERROR - ); - } - delete mp; - break; - case MSG_PRIORITY_ALERT_INFO: - if (m_iMessageSequenceNumber) { - pFrame->ShowAlert( - _("BOINC info"), - mp->body.c_str(), - wxICON_INFORMATION - ); - } - delete mp; - break; - default: - messages.messages.push_back(mp); - } - new_msgs.messages.erase(mi); + if (messages.messages.size() != 0) { + m_iMessageSequenceNumber = messages.messages.at(messages.messages.size()-1)->seqno; } - m_iMessageSequenceNumber = new_msg_seqno; } done: in_this_func = false;