- MGR: Restore state even if we are not going to display the

window.  Otherwise when restoring from the system tray
        we'll end up on the resources tab.
    - MGR: Save state before exit.
    
    clientgui/
    BOINCBaseFrame.cpp
    BOINCGUIApp.cpp

svn path=/trunk/boinc/; revision=17565
This commit is contained in:
Rom Walton 2009-03-09 18:34:33 +00:00
parent cb2a28fd52
commit a27f4a9b86
3 changed files with 18 additions and 2 deletions

View File

@ -2935,3 +2935,13 @@ Rom 9 Mar 2009
ViewStatistics.cpp
win_build/
boincmgr_curl.vcproj
Rom 9 Mar 2009
- MGR: Restore state even if we are not going to display the
window. Otherwise when restoring from the system tray
we'll end up on the resources tab.
- MGR: Save state before exit.
clientgui/
BOINCBaseFrame.cpp
BOINCGUIApp.cpp

View File

@ -340,6 +340,10 @@ void CBOINCBaseFrame::OnExit(wxCommandEvent& WXUNUSED(event)) {
if (wxGetApp().ConfirmExit()) {
// Save state before exiting
CFrameEvent eventSaveState(wxEVT_FRAME_SAVESTATE, this);
ProcessEvent(eventSaveState);
#ifdef __WXMSW__
CMainDocument* pDoc = wxGetApp().GetDocument();

View File

@ -879,10 +879,12 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
}
// Show the new frame if needed
if (pNewFrame && bShowWindow) {
if (pNewFrame) {
pNewFrame->FireRestoreState();
if (bShowWindow) {
pNewFrame->Show();
}
}
// Delete the old one if it exists
if (pOldFrame) pOldFrame->Destroy();