From 8a5053e670a949226eba34f35569df2c8afa7b3e Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 7 Aug 2012 17:21:58 +0000 Subject: [PATCH] - MGR: Enforce the 0..10 day limit on the connect interval for the advanced preferences dialog. At some point we should rename it. clientgui/ DlgAdvPreferences.cpp svn path=/trunk/boinc/; revision=25988 --- checkin_notes | 8 ++++++++ clientgui/DlgAdvPreferences.cpp | 12 +++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 2c17c7a9a5..b2d8f67a31 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5308,3 +5308,11 @@ David 6 Aug 2012 client/ work_fetch.cpp + +Rom 7 Aug 2012 + - MGR: Enforce the 0..10 day limit on the connect interval for the + advanced preferences dialog. At some point we should rename + it. + + clientgui/ + DlgAdvPreferences.cpp diff --git a/clientgui/DlgAdvPreferences.cpp b/clientgui/DlgAdvPreferences.cpp index 9bbb5cfbde..4ec5951543 100644 --- a/clientgui/DlgAdvPreferences.cpp +++ b/clientgui/DlgAdvPreferences.cpp @@ -583,7 +583,6 @@ bool CDlgAdvPreferences::ValidateInput() { node = node->GetNext(); } //net page - buffer = m_txtNetEveryDayStart->GetValue(); if(!IsValidTimeValue(buffer)) { ShowErrorMessage(invMsgTime,m_txtNetEveryDayStart); @@ -595,14 +594,21 @@ bool CDlgAdvPreferences::ValidateInput() { ShowErrorMessage(invMsgTime,m_txtNetEveryDayStop); return false; } - //limit additional days from 0 to 10 + + //limit additional days from 0 to 10 double td; + m_txtNetConnectInterval->GetValue().ToDouble(&td); + if(td>10.0 || td < 0.0) { + ShowErrorMessage(invMsgFloat,m_txtNetConnectInterval); + return false; + } m_txtNetAdditionalDays->GetValue().ToDouble(&td); if(td>10.0 || td < 0.0) { ShowErrorMessage(invMsgFloat,m_txtNetAdditionalDays); return false; } - //all text ctrls in net special time panel + + //all text ctrls in net special time panel children = m_panelNetSpecialTimes->GetChildren(); node = children.GetFirst();