Mgr: skip exit confirmation dialog if user pressed emergency Exit button on AsyncRPCDlg

svn path=/trunk/boinc/; revision=19046
This commit is contained in:
Charlie Fenton 2009-09-11 20:38:05 +00:00
parent b4ad10182f
commit 0eeb16abaf
3 changed files with 19 additions and 8 deletions

View File

@ -7225,9 +7225,9 @@ David 25 Aug 2009
parse.cpp
Charlie 26 Aug 2009
MGR: on Linux, check list of running processes from procinfo_setup()
- MGR: on Linux, check list of running processes from procinfo_setup()
to determine if BOINC core client is running.
MGR: on Linux, accept 2 optional arguments:
- MGR: on Linux, accept 2 optional arguments:
"--clientdir=<dir>" or "-e <dir>" for directory containing client executable,
default is the directory containing the manager executable.
"--datadir=<dir>" or "-d <dir>" for BOINC data directory, default is the
@ -7255,7 +7255,7 @@ David 26 Aug 2009
sched_send.cpp
Charlie 26 Aug 2009
MGR: Bug fixes for Linux.
- MGR: Bug fixes for Linux.
clientgui/
AsyncRPC.cpp
@ -7638,3 +7638,11 @@ David 11 Sept 2009
client/
client_state.cpp
Charlie 11 Sept 2009
- Mgr: skip exit confirmation dialog if user pressed emergency Exit button
on AsyncRPCDlg.
clientgui/
AsyncRPC.cpp
BOINCGUIApp.cpp

View File

@ -34,6 +34,8 @@
#include "SkinManager.h"
#include "util.h"
extern bool s_bSkipExitConfirmation;
#ifdef __WXMAC__
#ifdef HAVE_PTHREAD_MUTEXATTR_T
@ -243,7 +245,7 @@ void BOINC_Condition::Broadcast() {
pthread_cond_broadcast(&m_cond);
}
#endif
#endif // __WXMAC__
// Delay in milliseconds before showing AsyncRPCDlg
#define RPC_WAIT_DLG_DELAY 1500
@ -834,6 +836,7 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
if (response == wxID_EXIT) {
pFrame = wxGetApp().GetFrame();
wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, wxID_EXIT);
s_bSkipExitConfirmation = true;
pFrame->AddPendingEvent(evt);
}
}

View File

@ -72,7 +72,7 @@ BEGIN_EVENT_TABLE (CBOINCGUIApp, wxApp)
END_EVENT_TABLE ()
static bool s_bSkipExitConfirmation = false;
bool s_bSkipExitConfirmation = false;
#ifdef __WXMAC__
@ -134,7 +134,6 @@ bool CBOINCGUIApp::OnInit() {
g_use_sandbox = false;
#endif
// Initialize statics
s_bSkipExitConfirmation = false;
// Initialize class variables
@ -994,11 +993,12 @@ int CBOINCGUIApp::ConfirmExit() {
}
}
#ifndef __WXMSW__
// Don't run confirmation dialog if logging out or shutting down
// Don't run confirmation dialog if logging out or shutting down Mac,
// or if emergency exit from AsyncRPCDlg
if (s_bSkipExitConfirmation)
return 1;
#ifndef __WXMSW__
if (!m_iDisplayExitDialog) {
return 1; // User doesn't want to display the dialog and wants to shutdown the client.
}