mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=8898
This commit is contained in:
parent
d9ee426071
commit
40d1162e35
|
@ -13793,3 +13793,9 @@ Bruce 20 Nov 2005
|
||||||
inc/
|
inc/
|
||||||
db_ops.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
|
||||||
|
|
|
@ -837,55 +837,20 @@ int CMainDocument::WorkAbort(int iIndex) {
|
||||||
int CMainDocument::CachedMessageUpdate() {
|
int CMainDocument::CachedMessageUpdate() {
|
||||||
int retval;
|
int retval;
|
||||||
static bool in_this_func = false;
|
static bool in_this_func = false;
|
||||||
int new_msg_seqno = m_iMessageSequenceNumber;
|
|
||||||
|
|
||||||
if (in_this_func) return 0;
|
if (in_this_func) return 0;
|
||||||
in_this_func = true;
|
in_this_func = true;
|
||||||
|
|
||||||
if (IsConnected()) {
|
if (IsConnected()) {
|
||||||
CMainFrame* pFrame = wxGetApp().GetFrame();
|
retval = rpc.get_messages(m_iMessageSequenceNumber, messages);
|
||||||
MESSAGES new_msgs;
|
|
||||||
|
|
||||||
wxASSERT(pFrame);
|
|
||||||
wxASSERT(wxDynamicCast(pFrame, CMainFrame));
|
|
||||||
|
|
||||||
retval = rpc.get_messages(m_iMessageSequenceNumber, new_msgs);
|
|
||||||
if (retval) {
|
if (retval) {
|
||||||
wxLogTrace(wxT("Function Status"), "CMainDocument::CachedMessageUpdate - Get Messages Failed '%d'", retval);
|
wxLogTrace(wxT("Function Status"), "CMainDocument::CachedMessageUpdate - Get Messages Failed '%d'", retval);
|
||||||
m_pNetworkConnection->SetStateDisconnected();
|
m_pNetworkConnection->SetStateDisconnected();
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
std::vector<MESSAGE*>::iterator mi = new_msgs.messages.begin();
|
if (messages.messages.size() != 0) {
|
||||||
while (mi != new_msgs.messages.end()) {
|
m_iMessageSequenceNumber = messages.messages.at(messages.messages.size()-1)->seqno;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
m_iMessageSequenceNumber = new_msg_seqno;
|
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
in_this_func = false;
|
in_this_func = false;
|
||||||
|
|
Loading…
Reference in New Issue