diff --git a/checkin_notes b/checkin_notes index d8e9e85f65..dc52937722 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6946,3 +6946,11 @@ Charlie 27 June 2006 mac_build/ boinc.xcodeproj/ project.pbxproj + +Rom 27 June 2006 + - Enable the Simple GUI only if the define SIMPLEGUI exists. + + clientgui/ + AdvancedFrame.cpp + BOINCGUIApp.cpp, .h + diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index 5cf6a6ba01..0a3ee3bbd7 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -990,7 +990,9 @@ void CAdvancedFrame::OnSelectComputer(wxCommandEvent& WXUNUSED(event)) { void CAdvancedFrame::OnSwitchGUI(wxCommandEvent& WXUNUSED(event)) { wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnSwitchGUI - Function Begin")); +#ifdef SIMPLEGUI wxGetApp().SetActiveGUI(BOINC_SIMPLEGUI, true); +#endif wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnSwitchGUI - Function End")); } diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index 0033a54913..e658bf1f1f 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -37,11 +37,13 @@ #include "BOINCGUIApp.h" #include "AdvancedFrame.h" +#ifdef SIMPLEGUI #include "common/wxAnimate.h" #include "common/wxFlatNotebook.h" #include "sg_ImageLoader.h" #include "sg_StatImageLoader.h" #include "sg_BoincSimpleGUI.h" +#endif ////@begin XPM images @@ -260,7 +262,11 @@ bool CBOINCGUIApp::OnInit() { m_bBOINCStartedByManager = false; m_pFrame = NULL; m_bGUIVisible = true; +#ifdef SIMPLEGUI m_iGUISelected = BOINC_SIMPLEGUI; +#else + m_iGUISelected = BOINC_ADVANCEDGUI; +#endif m_lBOINCCoreProcessId = 0; #ifdef __WXMSW__ m_hBOINCCoreProcess = NULL; @@ -427,8 +433,10 @@ bool CBOINCGUIApp::OnInit() { m_pDocument->OnInit(); +#ifdef SIMPLEGUI // Which GUI should be displayed? m_iGUISelected = m_pConfig->Read(wxT("GUISelection"), BOINC_SIMPLEGUI); +#endif // Initialize the task bar icon m_pTaskBarIcon = new CTaskBarIcon( @@ -1016,6 +1024,7 @@ int CBOINCGUIApp::StartBOINCScreensaverTest() { bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) { +#ifdef SIMPLEGUI CBOINCBaseFrame* pNewFrame = NULL; // Create the new window @@ -1027,7 +1036,6 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) { m_pBranding->GetApplicationName(), m_pBranding->GetApplicationIcon() ); - wxASSERT(pNewFrame); break; case BOINC_ADVANCEDGUI: default: @@ -1036,9 +1044,9 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) { m_pBranding->GetApplicationName(), m_pBranding->GetApplicationIcon() ); - wxASSERT(pNewFrame); break; } + wxASSERT(pNewFrame); if (pNewFrame) { SetTopWindow(pNewFrame); @@ -1049,6 +1057,18 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) { m_pFrame = pNewFrame; } } +#else + if (!m_pFrame) { + // Initialize the advanced gui window + iGUISelection = BOINC_ADVANCEDGUI; + m_pFrame = new CAdvancedFrame( + m_pBranding->GetApplicationName(), + m_pBranding->GetApplicationIcon() + ); + wxASSERT(m_pFrame); + SetTopWindow(m_pFrame); + } +#endif // Show the new frame if needed if (m_pFrame && bShowWindow) m_pFrame->Show(); diff --git a/clientgui/BOINCGUIApp.h b/clientgui/BOINCGUIApp.h index 724ce53ab0..154d6a916d 100644 --- a/clientgui/BOINCGUIApp.h +++ b/clientgui/BOINCGUIApp.h @@ -34,7 +34,9 @@ #include "MainDocument.h" #define BOINC_ADVANCEDGUI 1 +#ifdef SIMPLEGUI #define BOINC_SIMPLEGUI 2 +#endif class CBrandingScheme : public wxObject { diff --git a/win_build/boincmgr_curl.vcproj b/win_build/boincmgr_curl.vcproj index 540694ed7b..cb65a3e5d4 100644 --- a/win_build/boincmgr_curl.vcproj +++ b/win_build/boincmgr_curl.vcproj @@ -264,36 +264,40 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - @@ -676,33 +645,6 @@ - - - - - - - - - - - - - - - - @@ -726,22 +668,6 @@ RelativePath="..\clientgui\common\wxAnimate.h"> - - - - - - - - - - @@ -865,6 +791,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -877,6 +872,27 @@ + + + + + + + + + + + +