From 40d1162e353d4615d4f8859c361228f7cbe7be96 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 21 Nov 2005 19:40:26 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=8898 --- checkin_notes | 6 ++++++ clientgui/MainDocument.cpp | 41 +++----------------------------------- 2 files changed, 9 insertions(+), 38 deletions(-) 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;