mirror of https://github.com/BOINC/boinc.git
- 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:
parent
cb2a28fd52
commit
a27f4a9b86
|
@ -2935,3 +2935,13 @@ Rom 9 Mar 2009
|
||||||
ViewStatistics.cpp
|
ViewStatistics.cpp
|
||||||
win_build/
|
win_build/
|
||||||
boincmgr_curl.vcproj
|
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
|
||||||
|
|
|
@ -340,6 +340,10 @@ void CBOINCBaseFrame::OnExit(wxCommandEvent& WXUNUSED(event)) {
|
||||||
|
|
||||||
if (wxGetApp().ConfirmExit()) {
|
if (wxGetApp().ConfirmExit()) {
|
||||||
|
|
||||||
|
// Save state before exiting
|
||||||
|
CFrameEvent eventSaveState(wxEVT_FRAME_SAVESTATE, this);
|
||||||
|
ProcessEvent(eventSaveState);
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||||
|
|
||||||
|
|
|
@ -879,10 +879,12 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the new frame if needed
|
// Show the new frame if needed
|
||||||
if (pNewFrame && bShowWindow) {
|
if (pNewFrame) {
|
||||||
pNewFrame->FireRestoreState();
|
pNewFrame->FireRestoreState();
|
||||||
|
if (bShowWindow) {
|
||||||
pNewFrame->Show();
|
pNewFrame->Show();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Delete the old one if it exists
|
// Delete the old one if it exists
|
||||||
if (pOldFrame) pOldFrame->Destroy();
|
if (pOldFrame) pOldFrame->Destroy();
|
||||||
|
|
Loading…
Reference in New Issue