mirror of https://github.com/BOINC/boinc.git
- MGR: Give the option to shutdown the CC even if the manager
didn't launch it. This only applies to when the manager and client are on the same machine. clientgui/ BOINCGUIApp.cpp svn path=/trunk/boinc/; revision=16420
This commit is contained in:
parent
970dc25474
commit
c7e950e9e3
|
@ -9170,3 +9170,11 @@ David 4 Nov 2008
|
||||||
Makefile.am
|
Makefile.am
|
||||||
sched/
|
sched/
|
||||||
handle_request.cpp
|
handle_request.cpp
|
||||||
|
|
||||||
|
Rom 4 Nov 2008
|
||||||
|
- MGR: Give the option to shutdown the CC even if the manager
|
||||||
|
didn't launch it. This only applies to when the manager
|
||||||
|
and client are on the same machine.
|
||||||
|
|
||||||
|
clientgui/
|
||||||
|
BOINCGUIApp.cpp
|
||||||
|
|
|
@ -826,6 +826,7 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
|
||||||
int CBOINCGUIApp::ConfirmExit() {
|
int CBOINCGUIApp::ConfirmExit() {
|
||||||
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
|
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
|
||||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||||
|
wxString strConnectedCompter = wxEmptyString;
|
||||||
bool bWasVisible;
|
bool bWasVisible;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
|
@ -834,11 +835,20 @@ int CBOINCGUIApp::ConfirmExit() {
|
||||||
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
|
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
|
||||||
wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
|
wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
|
||||||
|
|
||||||
if (!(pDoc->m_pClientManager->WasBOINCStartedByManager()))
|
// If we are connected to the local core client and the manager is exiting
|
||||||
return 1; // Don't display dialog if exiting manager won't shut down client or its tasks
|
// give the user the option to shutdown the core client, even if the
|
||||||
|
// manager didn't launch the core client anyway.
|
||||||
if (m_iShutdownCoreClient && !m_iDisplayExitDialog)
|
if (!pDoc->m_pClientManager->WasBOINCStartedByManager()) {
|
||||||
|
pDoc->GetConnectedComputerName(strConnectedCompter);
|
||||||
|
if (!pDoc->IsComputerNameLocal(strConnectedCompter)) {
|
||||||
|
// Don't shutdown remote clients
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_iShutdownCoreClient && !m_iDisplayExitDialog) {
|
||||||
return 1; // User doesn't want to display the dialog and wants to shutdown the client.
|
return 1; // User doesn't want to display the dialog and wants to shutdown the client.
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// Don't run confirmation dialog if logging out or shutting down
|
// Don't run confirmation dialog if logging out or shutting down
|
||||||
|
|
Loading…
Reference in New Issue