From e58022e6e8c5c0312e090b3c258bc333cd0a5b2a Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 7 Mar 2011 15:48:22 +0000 Subject: [PATCH] - MGR: ComboBox's are zero index based. clientgui/ DlgOptions.cpp, .h svn path=/trunk/boinc/; revision=23173 --- checkin_notes | 6 ++++++ clientgui/DlgOptions.cpp | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/checkin_notes b/checkin_notes index 01428c5d99..006a29d2e9 100644 --- a/checkin_notes +++ b/checkin_notes @@ -1400,3 +1400,9 @@ Rom 7 Mar 2011 BOINCBaseFrame.cpp, .h BOINCTaskBar.cpp DlgOptions.cpp, .h + +Rom 7 Mar 2011 + - MGR: ComboBox's are zero index based. + + clientgui/ + DlgOptions.cpp, .h diff --git a/clientgui/DlgOptions.cpp b/clientgui/DlgOptions.cpp index 355865a27e..def0cd3bfe 100644 --- a/clientgui/DlgOptions.cpp +++ b/clientgui/DlgOptions.cpp @@ -577,22 +577,22 @@ bool CDlgOptions::ReadSettings() { switch(pFrame->GetReminderFrequency()) { case 1: - m_ReminderFrequencyCtrl->SetSelection(1); + m_ReminderFrequencyCtrl->SetSelection(0); break; case 60: - m_ReminderFrequencyCtrl->SetSelection(2); + m_ReminderFrequencyCtrl->SetSelection(1); break; case 360: - m_ReminderFrequencyCtrl->SetSelection(3); + m_ReminderFrequencyCtrl->SetSelection(2); break; case 1440: - m_ReminderFrequencyCtrl->SetSelection(4); + m_ReminderFrequencyCtrl->SetSelection(3); break; case 10080: - m_ReminderFrequencyCtrl->SetSelection(5); + m_ReminderFrequencyCtrl->SetSelection(4); break; case 0: - m_ReminderFrequencyCtrl->SetSelection(6); + m_ReminderFrequencyCtrl->SetSelection(5); break; } @@ -692,22 +692,22 @@ bool CDlgOptions::SaveSettings() { pFrame->SetSelectedLanguage(m_LanguageSelectionCtrl->GetSelection()); switch(m_ReminderFrequencyCtrl->GetSelection()) { - case 1: + case 0: pFrame->SetReminderFrequency(1); break; - case 2: + case 1: pFrame->SetReminderFrequency(60); break; - case 3: + case 2: pFrame->SetReminderFrequency(360); break; - case 4: + case 3: pFrame->SetReminderFrequency(1440); break; - case 5: + case 4: pFrame->SetReminderFrequency(10080); break; - case 6: + case 5: pFrame->SetReminderFrequency(0); break; }