Skip to content

Commit

Permalink
Merge pull request #5887 from BOINC/dpa_prefs11
Browse files Browse the repository at this point in the history
Manager, advanced prefs: don't disable idle time box
  • Loading branch information
AenBleidd authored Nov 7, 2024
2 parents fa6d6c8 + 93b5bbf commit ba8c8bd
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions clientgui/DlgAdvPreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,8 @@ void CDlgAdvPreferences::ReadPreferenceSettings() {
m_chkGPUProcInUse->Disable();
}

// idle for X minutes
if (m_chkProcInUse->IsChecked() || m_chkGPUProcInUse->IsChecked()) {
m_txtProcIdleFor->Enable();
DisplayValue(prefs.idle_time_to_run, m_txtProcIdleFor);
} else {
m_txtProcIdleFor->Clear();
m_txtProcIdleFor->Disable();
}
// idle if no input in X minutes
DisplayValue(prefs.idle_time_to_run, m_txtProcIdleFor);

m_chkNoRecentInput->SetValue(prefs.suspend_if_no_recent_input > 0.0);
DisplayValue(prefs.suspend_if_no_recent_input, m_txtNoRecentInput, m_chkNoRecentInput);
Expand Down Expand Up @@ -713,14 +707,6 @@ bool CDlgAdvPreferences::SavePreferencesSettings() {
//
void CDlgAdvPreferences::UpdateControlStates() {
// ######### proc usage page
// Disable idle timeout edit text item if we allow both CPU and GPU when idle.
bool wasEnabled = m_txtProcIdleFor->IsEnabled();
bool shouldEnable = m_chkProcInUse->IsChecked() || m_chkGPUProcInUse->IsChecked();
m_txtProcIdleFor->Enable(shouldEnable);
if (wasEnabled && !shouldEnable) m_txtProcIdleFor->Clear();
if (shouldEnable && !wasEnabled) {
DisplayValue(defaultPrefs.idle_time_to_run, m_txtProcIdleFor);
}

// If we suspend work when in use, disable and check "Use GPU when in use"
m_chkGPUProcInUse->Enable(! m_chkProcInUse->IsChecked());
Expand Down

0 comments on commit ba8c8bd

Please sign in to comment.