From edd152ebe24a062423bc6b0bebafd024bf976d8a Mon Sep 17 00:00:00 2001 From: "selmer%netscape.com" Date: Sun, 29 Aug 1999 22:07:39 +0000 Subject: [PATCH] Fix combobox to have first item selected git-svn-id: svn://10.0.0.236/trunk@45083 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cck/driver/WizardMachine.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/mozilla/cck/driver/WizardMachine.cpp b/mozilla/cck/driver/WizardMachine.cpp index 5f1d5c0c2a9..db6269ca22c 100644 --- a/mozilla/cck/driver/WizardMachine.cpp +++ b/mozilla/cck/driver/WizardMachine.cpp @@ -458,11 +458,7 @@ NODE* CWizardMachineApp::CreateNode(NODE *parentNode, CString iniFile) } else { - BOOL readValue = FALSE; - if (widgetEntry->value == "") - { - readValue = TRUE; - } + BOOL readValue = (widgetEntry->value == ""); BuildWidget(widgetEntry, iniSection, iniFile, NewNode->pageBaseIndex, readValue); widgetEntry->cached = FALSE; @@ -1412,7 +1408,7 @@ void CWizardMachineApp::GenerateList(CString action, WIDGET* targetWidget, CStri if (action == "GenerateDirList") { - if (fileList.IsDirectory()) // skip if this is a dir + if (fileList.IsDirectory()) // skip if this is not a dir { CString tmpFile = fileList.GetFileName(); if (!(tmpFile == "." || tmpFile == "..")) { @@ -1432,6 +1428,15 @@ void CWizardMachineApp::GenerateList(CString action, WIDGET* targetWidget, CStri } fileList.Close(); + + if(curWidget->type == "ListBox") + { + ((CListBox*)curWidget->control)->SetCurSel(0); + } + else if(curWidget->type == "ComboBox") + { + ((CComboBox*)curWidget->control)->SetCurSel(0); + } } void CWizardMachineApp::HelpWiz()