*** empty log message ***

svn path=/trunk/boinc/; revision=11358
This commit is contained in:
Rom Walton 2006-10-25 21:51:37 +00:00
parent 9cdd52f154
commit 3057575b0b
6 changed files with 43 additions and 70 deletions

View File

@ -11512,3 +11512,12 @@ David 25 Oct 2006
project_specific_prefs.inc.sample
sched/
sched_send.C
Rom 25 Oct 2006
- MGR: Check to see if the clientindictor timer pointer is valid before
stopping and deleting it.
clientgui/
BOINCGUIApp.cpp
sg_BoincSimpleGUI.cpp, .h
sg_ClientStateIndicator.cpp

View File

@ -90,9 +90,9 @@ bool CBOINCGUIApp::OnInit() {
m_pMacSystemMenu = NULL;
#endif
m_bGUIVisible = true;
m_strDefaultWindowStation = wxT("");
m_strDefaultDesktop = wxT("");
m_strDefaultDisplay = wxT("");
m_strDefaultWindowStation = wxEmptyString;
m_strDefaultDesktop = wxEmptyString;
m_strDefaultDisplay = wxEmptyString;
m_lBOINCCoreProcessId = 0;
#ifdef SIMPLEGUI
m_iGUISelected = BOINC_SIMPLEGUI;

View File

@ -1251,7 +1251,6 @@ bool CSkinManager::ReloadSkin(wxLocale* pLocale, wxString strSkin) {
// locale.
// i.e. en
if (ERR_XML_PARSE == retval) {
retval = ERR_XML_PARSE;
p = fopen(ConstructSkinFileName().c_str(), "r");
if (p) {
mf.init_file(p);
@ -1263,7 +1262,6 @@ bool CSkinManager::ReloadSkin(wxLocale* pLocale, wxString strSkin) {
// If we failed the second lookup try english
// i.e. en
if (ERR_XML_PARSE == retval) {
retval = ERR_XML_PARSE;
p = fopen(ConstructSkinFileName().c_str(), "r");
if (p) {
mf.init_file(p);
@ -1280,7 +1278,6 @@ bool CSkinManager::ReloadSkin(wxLocale* pLocale, wxString strSkin) {
);
}
// Make sure all the resources are loaded and valid.
ValidateSkin();

View File

@ -249,7 +249,28 @@ void CSimpleFrame::OnConnect(CFrameEvent& WXUNUSED(event)) {
void CSimpleFrame::OnReloadSkin(CFrameEvent& WXUNUSED(event)) {
ReskinAppGUI();
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnReloadSkin - Function Start"));
CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple();
wxASSERT(pSkinSimple);
wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple));
//bg color
SetBackgroundColour(*pSkinSimple->GetBackgroundImage()->GetBackgroundColor());
if(notebookViewInitialized){
if (wrkUnitNB) wrkUnitNB->ReskinAppGUI();
} else {
if (clientState) clientState->ReskinInterface();
}
//reskin component
if (projComponent) projComponent->ReskinInterface();
Refresh();
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnReloadSkin - Function End"));
}
@ -404,69 +425,15 @@ void CSimpleFrame::InitNotebook()
}
void CSimpleFrame::ReskinAppGUI(){
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::ReskinAppGUI - Function Start"));
CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple();
wxASSERT(pSkinSimple);
wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple));
//bg color
SetBackgroundColour(*pSkinSimple->GetBackgroundImage()->GetBackgroundColor());
if(notebookViewInitialized){
if (wrkUnitNB) wrkUnitNB->ReskinAppGUI();
} else {
if (clientState) clientState->ReskinInterface();
}
//reskin component
if (projComponent) projComponent->ReskinInterface();
Refresh();
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::ReskinAppGUI - Function End"));
}
void CSimpleFrame::OnEraseBackground(wxEraseEvent& event){
CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple();
wxASSERT(pSkinSimple);
wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple));
wxObject *m_wxWin = event.GetEventObject();
if(m_wxWin==this){event.Skip(true);DrawBackImg(event,this,pSkinSimple->GetBackgroundImage()->GetBitmap(),0);return;}
event.Skip(true);
}
void CSimpleFrame::DrawBackImg(wxEraseEvent& event,wxWindow *win,wxBitmap* bitMap,int opz){
event.Skip(false);
wxDC *dc;
dc=event.GetDC();
dc->SetBackground(wxBrush(win->GetBackgroundColour(),wxSOLID));
dc->Clear();
switch (opz) {
case 0:{
dc->DrawBitmap(*bitMap, 0, 0);
break;}
case 1:{
wxRect rec=win->GetClientRect();
rec.SetLeft((rec.GetWidth()-bitMap->GetWidth()) / 2);
rec.SetTop ((rec.GetHeight()-bitMap->GetHeight()) / 2);
dc->DrawBitmap(*bitMap,rec.GetLeft(),rec.GetTop(),0);
break;}
case 2:{
wxRect rec=win->GetClientRect();
for(int y=0;y < rec.GetHeight();y+=bitMap->GetHeight()){
for(int x=0;x < rec.GetWidth();x+=bitMap->GetWidth()){
dc->DrawBitmap(*bitMap,x,y,0);
}
}
break;}
}
wxDC *dc = event.GetDC();
dc->Clear();
dc->SetBackground(wxBrush(GetBackgroundColour(),wxSOLID));
dc->DrawBitmap(*pSkinSimple->GetBackgroundImage()->GetBitmap(), 0, 0);
}

View File

@ -65,7 +65,6 @@ public:
void InitResultView();
void InitProjectView();
void UpdateProjectView();
void ReskinAppGUI();
void InitNotebook();
void DestroyNotebook();
void OnProjectsAttachToProject();
@ -97,8 +96,6 @@ protected:
void OnReloadSkin( CFrameEvent& event );
void OnFrameRender(wxTimerEvent& event );
void DrawBackImg(wxEraseEvent& event,wxWindow *win,wxBitmap* bitMap,int opz);
private:
bool SaveState();
bool RestoreState();

View File

@ -58,7 +58,7 @@ ClientStateIndicator::ClientStateIndicator(CSimpleFrame* parent,wxPoint coord) :
indexIndVis = 1;//first will be visible on start
rightPosition = 118;
topPosition = 5;
stateMessage = wxString("");
stateMessage = wxEmptyString;
clientState = CLIENT_STATE_NONE;
CreateComponent();
error_time = 0;
@ -67,7 +67,10 @@ ClientStateIndicator::ClientStateIndicator(CSimpleFrame* parent,wxPoint coord) :
ClientStateIndicator::~ClientStateIndicator()
{
delete m_connRenderTimer;
if (m_connRenderTimer) {
m_connRenderTimer->Stop();
delete m_connRenderTimer;
}
}
void ClientStateIndicator::CreateComponent(){