mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=10938
This commit is contained in:
parent
c9b799b3c7
commit
b5dee1ac90
|
@ -8928,3 +8928,10 @@ Milos 17 Aug 2006
|
|||
sg_DlgPreferences.cpp,h
|
||||
sg_ProjectsComponent.cpp
|
||||
|
||||
Rom 17 Aug 2006
|
||||
- Bug Fix: Keep both the global state and the updated tasks records in sync within
|
||||
the simple GUI.
|
||||
|
||||
clientgui/
|
||||
MainDocument.cpp, .h
|
||||
sg_BoincSimpleGUI.cpp
|
||||
|
|
|
@ -1238,6 +1238,17 @@ int CMainDocument::CachedSimpleGUIUpdate() {
|
|||
}
|
||||
|
||||
|
||||
int CMainDocument::GetSimpleGUIWorkCount() {
|
||||
int iCount = -1;
|
||||
|
||||
CachedSimpleGUIUpdate();
|
||||
CachedStateUpdate();
|
||||
|
||||
if (!results.results.empty())
|
||||
iCount = (int)results.results.size();
|
||||
|
||||
return iCount;
|
||||
}
|
||||
|
||||
|
||||
const char *BOINC_RCSID_aa03a835ba = "$Id$";
|
||||
|
|
|
@ -274,10 +274,12 @@ public:
|
|||
//
|
||||
// Simple GUI Updates
|
||||
//
|
||||
public:
|
||||
int CachedSimpleGUIUpdate();
|
||||
private:
|
||||
wxDateTime m_dtCachedSimpleGUITimestamp;
|
||||
int CachedSimpleGUIUpdate();
|
||||
|
||||
public:
|
||||
int GetSimpleGUIWorkCount();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -227,26 +227,21 @@ void CSimpleFrame::OnProjectsAttachToProject() {
|
|||
}
|
||||
|
||||
void CSimpleFrame::OnFrameRender(wxTimerEvent& WXUNUSED(event)) {
|
||||
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
int retValue;
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
||||
//Update data
|
||||
if(pDoc->IsConnected()){
|
||||
retValue = pDoc->CachedSimpleGUIUpdate();
|
||||
if(retValue==0){
|
||||
// Update the document state, any subsequent calls will just used the
|
||||
// cached data.
|
||||
pDoc->GetSimpleGUIWorkCount();
|
||||
if(!clientGUIInitialized){
|
||||
//Freeze();
|
||||
InitSimpleClient();
|
||||
initAfter();
|
||||
// Thaw();
|
||||
//Update();
|
||||
clientGUIInitialized = true;
|
||||
//Show(true);
|
||||
}else{ //check for changes in the interface
|
||||
}
|
||||
UpdateClientGUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -271,8 +266,7 @@ void CSimpleFrame::InitSimpleClient()
|
|||
// Do not update screen at this point
|
||||
Freeze();
|
||||
//create work unit tabs
|
||||
//int resultCnt = pDoc->GetWorkCount();
|
||||
int resultCnt = (int)pDoc->results.results.size();
|
||||
int resultCnt = (int)pDoc->GetSimpleGUIWorkCount();
|
||||
if(resultCnt > 0){
|
||||
//init nootebok
|
||||
InitNotebook();
|
||||
|
@ -314,8 +308,7 @@ void CSimpleFrame::UpdateClientGUI(){
|
|||
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
//update GUI
|
||||
//int resultCnt = pDoc->GetWorkCount();
|
||||
int resultCnt = (int)pDoc->results.results.size();
|
||||
int resultCnt = (int)pDoc->GetSimpleGUIWorkCount();
|
||||
wxString strBuffer = wxEmptyString;
|
||||
//assume they are all inactive
|
||||
for(int x = 0; x < (int)m_windows.size(); x ++)
|
||||
|
|
Loading…
Reference in New Issue