mirror of https://github.com/BOINC/boinc.git
- MGR: Bug fixes for the new Exit dialog.
clientgui/ BOINCBaseFrame.cpp BOINCClientManager.h BOINCGUIApp.cpp, .h BOINCTaskBar.cpp screensaver_win.cpp svn path=/trunk/boinc/; revision=16414
This commit is contained in:
parent
6c18a58144
commit
7652d57839
|
@ -9136,3 +9136,13 @@ Rom 4 Nov 2008
|
|||
clientgui
|
||||
DlgExitMessage.cpp
|
||||
DlgGenericMessage.cpp
|
||||
|
||||
Rom 4 Nov 2008
|
||||
- MGR: Bug fixes for the new Exit dialog.
|
||||
|
||||
clientgui/
|
||||
BOINCBaseFrame.cpp
|
||||
BOINCClientManager.h
|
||||
BOINCGUIApp.cpp, .h
|
||||
BOINCTaskBar.cpp
|
||||
screensaver_win.cpp
|
||||
|
|
|
@ -332,7 +332,17 @@ void CBOINCBaseFrame::OnCloseWindow(wxCommandEvent& WXUNUSED(event)) {
|
|||
void CBOINCBaseFrame::OnExit(wxCommandEvent& WXUNUSED(event)) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnExit - Function Begin"));
|
||||
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
||||
wxASSERT(pDoc);
|
||||
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
|
||||
|
||||
if (wxGetApp().ConfirmExit()) {
|
||||
|
||||
if (!wxGetApp().ShouldShutdownCoreClient()) {
|
||||
pDoc->m_pClientManager->DisableBOINCStartedByManager();
|
||||
}
|
||||
|
||||
// Under wxWidgets 2.8.0, the task bar icons must be deleted for app to exit its main loop
|
||||
#ifdef __WXMAC__
|
||||
CMacSystemMenu* pMSM = wxGetApp().GetMacSystemMenu();
|
||||
|
@ -348,8 +358,8 @@ void CBOINCBaseFrame::OnExit(wxCommandEvent& WXUNUSED(event)) {
|
|||
}
|
||||
#endif
|
||||
Close(true);
|
||||
|
||||
}
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnExit - Function End"));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ public:
|
|||
|
||||
bool IsSystemBooting();
|
||||
int IsBOINCConfiguredAsDaemon();
|
||||
|
||||
void DisableBOINCStartedByManager() { m_bBOINCStartedByManager = false; };
|
||||
bool WasBOINCStartedByManager() { return m_bBOINCStartedByManager; };
|
||||
|
||||
bool IsBOINCCoreRunning();
|
||||
|
|
|
@ -840,9 +840,11 @@ int CBOINCGUIApp::ConfirmExit() {
|
|||
if (m_iShutdownCoreClient && !m_iDisplayExitDialog)
|
||||
return 1; // User doesn't want to display the dialog and wants to shutdown the client.
|
||||
|
||||
#ifdef __WXMAC__
|
||||
// Don't run confirmation dialog if logging out or shutting down
|
||||
if (s_bSkipExitConfirmation)
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
bWasVisible = IsApplicationVisible();
|
||||
ShowApplication(true);
|
||||
|
@ -853,17 +855,25 @@ int CBOINCGUIApp::ConfirmExit() {
|
|||
dlg.m_DialogExitMessage->SetLabel(pSkinAdvanced->GetExitMessage());
|
||||
}
|
||||
|
||||
dlg.m_DialogShutdownCoreClient->SetValue(1 == m_iShutdownCoreClient);
|
||||
dlg.m_DialogDisplay->SetValue(1 == m_iDisplayExitDialog);
|
||||
if (m_iShutdownCoreClient) {
|
||||
dlg.m_DialogShutdownCoreClient->SetValue(TRUE);
|
||||
}
|
||||
|
||||
if (m_iDisplayExitDialog) {
|
||||
dlg.m_DialogDisplay->SetValue(FALSE);
|
||||
}
|
||||
|
||||
dlg.Fit();
|
||||
dlg.Centre();
|
||||
|
||||
if (wxID_OK == dlg.ShowModal()) {
|
||||
m_iShutdownCoreClient = dlg.m_DialogShutdownCoreClient->GetValue();
|
||||
m_iDisplayExitDialog = dlg.m_DialogDisplay->GetValue();
|
||||
retval = m_iShutdownCoreClient;
|
||||
retval = true;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
s_bSkipExitConfirmation = true; // Don't ask twice (only affects Mac)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!bWasVisible) {
|
||||
|
|
|
@ -132,6 +132,8 @@ public:
|
|||
CMacSystemMenu* GetMacSystemMenu() { return m_pMacSystemMenu; }
|
||||
#endif
|
||||
|
||||
int ShouldShutdownCoreClient()
|
||||
{ return m_iShutdownCoreClient; }
|
||||
int GetBOINCMGRDisableAutoStart()
|
||||
{ return m_iBOINCMGRDisableAutoStart; }
|
||||
void SetBOINCMGRDisableAutoStart(int iDisableAutoStart)
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "MainDocument.h"
|
||||
#include "BOINCTaskBar.h"
|
||||
#include "BOINCBaseFrame.h"
|
||||
#include "BOINCClientManager.h"
|
||||
#include "DlgAbout.h"
|
||||
#include "Events.h"
|
||||
|
||||
|
@ -250,10 +251,19 @@ void CTaskBarIcon::OnAbout(wxCommandEvent& WXUNUSED(event)) {
|
|||
void CTaskBarIcon::OnExit(wxCommandEvent& event) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CTaskBarIcon::OnExit - Function Begin"));
|
||||
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
||||
wxASSERT(pDoc);
|
||||
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
|
||||
|
||||
#ifndef __WXMAC__
|
||||
if (wxGetApp().ConfirmExit())
|
||||
#endif
|
||||
{
|
||||
if (!wxGetApp().ShouldShutdownCoreClient()) {
|
||||
pDoc->m_pClientManager->DisableBOINCStartedByManager();
|
||||
}
|
||||
|
||||
wxCloseEvent eventClose;
|
||||
OnClose(eventClose);
|
||||
if (eventClose.GetSkipped()) event.Skip();
|
||||
|
|
|
@ -842,7 +842,6 @@ BOOL CScreensaver::GetTextForError(
|
|||
E_FAIL, IDS_ERR_GENERIC,
|
||||
E_OUTOFMEMORY, IDS_ERR_OUTOFMEMORY,
|
||||
SCRAPPERR_BOINCNOTDETECTED, IDS_ERR_BOINCNOTDETECTED,
|
||||
SCRAPPERR_BOINCNOTDETECTEDSTARTUP, IDS_ERR_BOINCNOTDETECTEDSTARTUP,
|
||||
SCRAPPERR_BOINCSUSPENDED, IDS_ERR_BOINCSUSPENDED,
|
||||
SCRAPPERR_BOINCNOAPPSEXECUTING, IDS_ERR_BOINCNOAPPSEXECUTING,
|
||||
SCRAPPERR_BOINCNOPROJECTSDETECTED, IDS_ERR_BOINCNOAPPSEXECUTINGNOPROJECTSDETECTED,
|
||||
|
|
Loading…
Reference in New Issue