mirror of https://github.com/BOINC/boinc.git
MGR: If aborting multiple tasks, ask "Are you sure?" only once.
svn path=/trunk/boinc/; revision=19284
This commit is contained in:
parent
f5de278719
commit
11911cd6b4
|
@ -8501,12 +8501,13 @@ Rom 7 Oct 2009
|
|||
|
||||
Bernd 7 Oct 2009
|
||||
- lib: some changes to help building the WIN32 library with MinGW/gcc
|
||||
enable by defining MINGW_WIN32 macro, nothing should change if
|
||||
this is not set
|
||||
enable by defining MINGW_WIN32 macro, nothing should change if
|
||||
this is not set
|
||||
|
||||
lib/
|
||||
boinc_win.h
|
||||
diagnostics.h
|
||||
filesys.cpp
|
||||
boinc_win.h
|
||||
diagnostics.h
|
||||
filesys.cpp
|
||||
|
||||
David 7 Oct 2009
|
||||
- client: if anonymous platform description (app_info.xml)
|
||||
|
@ -8517,3 +8518,9 @@ David 7 Oct 2009
|
|||
|
||||
client/
|
||||
client_state.cpp
|
||||
|
||||
Charlie 7 Oct 2009
|
||||
- MGR: If aborting multiple tasks, ask "Are you sure?" only once.
|
||||
|
||||
clientgui/
|
||||
ViewWork.cpp
|
||||
|
|
|
@ -397,12 +397,11 @@ void CViewWork::OnWorkAbort( wxCommandEvent& WXUNUSED(event) ) {
|
|||
wxLogTrace(wxT("Function Start/End"), wxT("CViewWork::OnWorkAbort - Function Begin"));
|
||||
|
||||
wxInt32 iAnswer = 0;
|
||||
wxInt32 iResult = 0;
|
||||
wxString strMessage = wxEmptyString;
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
CAdvancedFrame* pFrame = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame);
|
||||
CWork* work;
|
||||
int row;
|
||||
int row, n;
|
||||
|
||||
wxASSERT(pDoc);
|
||||
wxASSERT(pFrame);
|
||||
|
@ -414,15 +413,12 @@ void CViewWork::OnWorkAbort( wxCommandEvent& WXUNUSED(event) ) {
|
|||
if (!pDoc->IsUserAuthorized())
|
||||
return;
|
||||
|
||||
pFrame->UpdateStatusText(_("Aborting result..."));
|
||||
|
||||
row = -1;
|
||||
while (1) {
|
||||
// Step through all selected items
|
||||
n = m_pListPane->GetSelectedItemCount();
|
||||
|
||||
if (n == 1) {
|
||||
row = -1;
|
||||
row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
||||
if (row < 0) break;
|
||||
|
||||
iResult = m_iSortedIndexes[row];
|
||||
if (row < 0) return;
|
||||
if (GetWorkCacheAtIndex(work, m_iSortedIndexes[row])) {
|
||||
return;
|
||||
}
|
||||
|
@ -432,19 +428,32 @@ void CViewWork::OnWorkAbort( wxCommandEvent& WXUNUSED(event) ) {
|
|||
(work->m_strProgress).c_str(),
|
||||
(work->m_strStatus).c_str()
|
||||
);
|
||||
} else {
|
||||
strMessage.Printf(_("Are you sure you want to abort these %d tasks?"), n);
|
||||
}
|
||||
|
||||
iAnswer = wxGetApp().SafeMessageBox(
|
||||
strMessage,
|
||||
_("Abort task"),
|
||||
wxYES_NO | wxICON_QUESTION,
|
||||
this
|
||||
);
|
||||
iAnswer = wxGetApp().SafeMessageBox(
|
||||
strMessage,
|
||||
_("Abort task"),
|
||||
wxYES_NO | wxICON_QUESTION,
|
||||
this
|
||||
);
|
||||
|
||||
if (wxYES == iAnswer) {
|
||||
RESULT* result = pDoc->result(m_iSortedIndexes[row]);
|
||||
if (result) {
|
||||
pDoc->WorkAbort(result->project_url, result->name);
|
||||
}
|
||||
if (wxYES != iAnswer) {
|
||||
return;
|
||||
}
|
||||
|
||||
pFrame->UpdateStatusText(_("Aborting result..."));
|
||||
|
||||
row = -1;
|
||||
while (1) {
|
||||
// Step through all selected items
|
||||
row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
||||
if (row < 0) break;
|
||||
|
||||
RESULT* result = pDoc->result(m_iSortedIndexes[row]);
|
||||
if (result) {
|
||||
pDoc->WorkAbort(result->project_url, result->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue