mirror of https://github.com/BOINC/boinc.git
Merge pull request #5146 from BOINC/dpa_prefs4
Manager: enhance computing prefs dialog
This commit is contained in:
commit
66bae9a2fa
|
@ -267,7 +267,7 @@ void CDlgAdvPreferences::DisplayValue(double value, wxTextCtrl* textCtrl, wxChec
|
||||||
|
|
||||||
if (checkBox) {
|
if (checkBox) {
|
||||||
if (! checkBox->IsChecked()) {
|
if (! checkBox->IsChecked()) {
|
||||||
textCtrl->Clear();
|
//textCtrl->Clear();
|
||||||
textCtrl->Disable();
|
textCtrl->Disable();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -510,7 +510,7 @@ bool CDlgAdvPreferences::SavePreferencesSettings() {
|
||||||
}
|
}
|
||||||
mask.suspend_if_no_recent_input = true;
|
mask.suspend_if_no_recent_input = true;
|
||||||
|
|
||||||
if (m_txtMaxLoad->IsEnabled()) {
|
if (m_txtMaxLoad->IsEnabled() || !prefs.run_if_user_active) {
|
||||||
m_txtMaxLoad->GetValue().ToDouble(&td);
|
m_txtMaxLoad->GetValue().ToDouble(&td);
|
||||||
prefs.suspend_cpu_usage=RoundToHundredths(td);
|
prefs.suspend_cpu_usage=RoundToHundredths(td);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1117,13 +1117,19 @@ void CDlgAdvPreferences::OnHandleCommandEvent(wxCommandEvent& ev) {
|
||||||
switch (ev.GetId()) {
|
switch (ev.GetId()) {
|
||||||
// processor usage page
|
// processor usage page
|
||||||
case ID_CHKMAXLOAD:
|
case ID_CHKMAXLOAD:
|
||||||
|
if (!m_txtMaxLoad->GetValue()) {
|
||||||
DisplayValue(defaultPrefs.suspend_cpu_usage, m_txtMaxLoad, m_chkMaxLoad);
|
DisplayValue(defaultPrefs.suspend_cpu_usage, m_txtMaxLoad, m_chkMaxLoad);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ID_CHKMAXLOADNOTINUSE:
|
case ID_CHKMAXLOADNOTINUSE:
|
||||||
|
if (!m_txtMaxLoadNotInUse->GetValue()) {
|
||||||
DisplayValue(defaultPrefs.niu_suspend_cpu_usage, m_txtMaxLoadNotInUse, m_chkMaxLoadNotInUse);
|
DisplayValue(defaultPrefs.niu_suspend_cpu_usage, m_txtMaxLoadNotInUse, m_chkMaxLoadNotInUse);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ID_CHKNORECENTINPUT:
|
case ID_CHKNORECENTINPUT:
|
||||||
|
if (!m_txtNoRecentInput->GetValue()) {
|
||||||
DisplayValue(defaultPrefs.suspend_if_no_recent_input, m_txtNoRecentInput, m_chkNoRecentInput);
|
DisplayValue(defaultPrefs.suspend_if_no_recent_input, m_txtNoRecentInput, m_chkNoRecentInput);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
// network usage page
|
// network usage page
|
||||||
case ID_CHKNETDOWNLOADRATE:
|
case ID_CHKNETDOWNLOADRATE:
|
||||||
|
|
Loading…
Reference in New Issue