*** empty log message ***

svn path=/trunk/boinc/; revision=6243
This commit is contained in:
Rom Walton 2005-05-24 21:26:49 +00:00
parent 43d7563ce6
commit 6052f03d18
4 changed files with 35 additions and 12 deletions

View File

@ -7020,3 +7020,13 @@ David 24 May 2005
lib/
prefs.C,h
result_state.h
Rom 24 May 2005
- Instead of going to sleep to give the CC enough time to open a
listening socket we should attempt to connect after we have received
our first OnFrameRender timer event which will happen after at
least one window idle event.
clientgui/
BOINCGUIApp.cpp
MainFrame.cpp, .h

View File

@ -451,7 +451,7 @@ void CBOINCGUIApp::StartupBOINCCore() {
#ifndef __WXMAC__
// Append boinc.exe to the end of the strExecute string and get ready to rock
strExecute += wxT("/boinc");
strExecute += wxT("boinc");
#endif // ! __WXMAC__
@ -462,11 +462,6 @@ void CBOINCGUIApp::StartupBOINCCore() {
if (0 != m_lBOINCCoreProcessId) {
m_bBOINCStartedByManager = true;
}
// Sleep for 5 seconds to avoid connection failures that might occur if
// the core client has not opened any sockets by the next time we
// request network IO
::wxSleep(5);
}
}

View File

@ -220,10 +220,12 @@ CMainFrame::CMainFrame(wxString strTitle) :
SetStatusBarPane(0);
// Complete any remaining initialization that has to happen after we are up
// and running
CMainFrameEvent event(wxEVT_MAINFRAME_INITIALIZED, this);
AddPendingEvent(event);
// The second half of the initialization process picks up in the OnFrameRender()
// routine since the menus' and status bars' are drawn in the frameworks
// on idle routines, on idle events are sent in between the end of the
// constructor and the first call to OnFrameRender
//
// Look for the 'if (!bAlreadyRunOnce) {' statement
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::CMainFrame - Function End"));
}
@ -1163,8 +1165,9 @@ void CMainFrame::OnInitialized(CMainFrameEvent&) {
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
if (!pDoc->IsConnected())
if (!pDoc->IsConnected()) {
pDoc->Connect(wxEmptyString, wxEmptyString, TRUE);
}
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnInitialized - Function End"));
}
@ -1228,14 +1231,22 @@ void CMainFrame::OnRefreshState(wxTimerEvent &event) {
void CMainFrame::OnFrameRender(wxTimerEvent &event) {
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnFrameRender - Function Begin"));
CMainDocument* pDoc = wxGetApp().GetDocument();
static bool bAlreadyRunningLoop = false;
static bool bAlreadyRunOnce = false;
CMainDocument* pDoc = wxGetApp().GetDocument();
if (!bAlreadyRunningLoop) {
bAlreadyRunningLoop = true;
wxGetApp().UpdateSystemIdleDetection();
if (!bAlreadyRunOnce) {
// Complete any remaining initialization that has to happen after we are up
// and running
FireInitialize();
bAlreadyRunOnce = true;
}
if (IsShown()) {
if (pDoc) {
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
@ -1401,6 +1412,12 @@ void CMainFrame::UpdateStatusText(const wxChar* szStatus) {
}
void CMainFrame::FireInitialize() {
CMainFrameEvent event(wxEVT_MAINFRAME_INITIALIZED, this);
AddPendingEvent(event);
}
void CMainFrame::FireConnect() {
CMainFrameEvent event(wxEVT_MAINFRAME_CONNECT, this);
AddPendingEvent(event);

View File

@ -89,6 +89,7 @@ public:
void UpdateStatusText( const wxChar* szStatus );
void FireInitialize();
void FireConnect();
void FireConnectError();
void FireConnectErrorAuthentication();