mirror of https://github.com/BOINC/boinc.git
Merge pull request #4955 from Vulpine05/Vulpine05-4939_Mgr
[Manager] [Advanced View] Add warning message in preferences for suspension
This commit is contained in:
commit
d238b9bab3
|
@ -744,6 +744,7 @@ bool CDlgAdvPreferences::ValidateInput() {
|
|||
wxString invMsgLimit10 = _("Number must be between 0 and 10");
|
||||
wxString invMsgLimit100 = _("Number must be between 0 and 100");
|
||||
wxString invMsgLimit1_100 = _("Number must be between 1 and 100");
|
||||
wxString invMsgIdle = _("Suspend when no mouse or keyboard input needs to be greater than 'in use' mouse or keyboard input.");
|
||||
wxString buffer;
|
||||
double startTime, endTime;
|
||||
|
||||
|
@ -783,6 +784,22 @@ bool CDlgAdvPreferences::ValidateInput() {
|
|||
}
|
||||
}
|
||||
|
||||
// Checks for a condition where no computing could occur if suspended until idle and
|
||||
// suspend after being idle overlap.
|
||||
//
|
||||
if (m_txtProcIdleFor->IsEnabled() && m_chkNoRecentInput->IsChecked()) {
|
||||
wxString bufferNRI = m_txtNoRecentInput->GetValue();
|
||||
wxString bufferPIF = m_txtProcIdleFor->GetValue();
|
||||
double valueNRI;
|
||||
bufferNRI.ToDouble(&valueNRI);
|
||||
double valuePIF;
|
||||
bufferPIF.ToDouble(&valuePIF);
|
||||
if((valuePIF - valueNRI + 0.005) >=0) { // 0.005 is included to factor in rounding to nearest hundredth
|
||||
ShowErrorMessage(invMsgIdle, m_txtNoRecentInput);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_txtMaxLoad->IsEnabled()) {
|
||||
buffer = m_txtMaxLoad->GetValue();
|
||||
if(!IsValidFloatValueBetween(buffer, 1.0, 100.0)) {
|
||||
|
|
Loading…
Reference in New Issue