Fixed bug getting the pretty value from bool prefs with choices.

This commit is contained in:
smeredith%netscape.com 2002-05-14 16:51:12 +00:00
Родитель f495e1b3bf
Коммит aa18c2596d
1 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -134,22 +134,22 @@ BOOL CDlgEditPrefStr::OnInitDialog()
// Caller only has to get value from m_strValue for all types. // Caller only has to get value from m_strValue for all types.
void CDlgEditPrefStr::OnOK() void CDlgEditPrefStr::OnOK()
{ {
// For bool types, convert back to the data string.
if (m_strType.CompareNoCase("bool") == 0)
{
if (m_checkValue.GetCheck())
m_editValue.SetWindowText("true");
else
m_editValue.SetWindowText("false");
}
// For choose, return the selected list string. // For choose, return the selected list string.
else if (m_bChoose) if (m_bChoose)
{ {
CString strSelectString; CString strSelectString;
m_listValue.GetLBText(m_listValue.GetCurSel(), strSelectString); m_listValue.GetLBText(m_listValue.GetCurSel(), strSelectString);
m_editValue.SetWindowText(strSelectString); m_editValue.SetWindowText(strSelectString);
} }
// For bool types, convert back to the data string.
else if (m_strType.CompareNoCase("bool") == 0)
{
if (m_checkValue.GetCheck())
m_editValue.SetWindowText("true");
else
m_editValue.SetWindowText("false");
}
else // string, int type else // string, int type
{ {