# HG changeset patch # User jld # Date 1045671337 0 # Node ID bf939f3a422a487ba76e475361ca65249a437af1 # Parent 9af89f29508839baec8418c51ca6f7e81c3b0494 * standalone/wxwin/platformeditordlg.cpp: Fix erroneously disabled OK button and duplicate entries in prefix list. diff --git a/host/tools/configtool/ChangeLog b/host/tools/configtool/ChangeLog --- a/host/tools/configtool/ChangeLog +++ b/host/tools/configtool/ChangeLog @@ -1,5 +1,8 @@ 2003-02-19 John Dallaway + * standalone/wxwin/platformeditordlg.cpp: + Fix erroneously disabled OK button and duplicate entries in prefix list. + * standalone/wxwin/makefile.gnu: Use libtcl.a rather than libcygtcl83.a for Cygwin build diff --git a/host/tools/configtool/standalone/wxwin/platformeditordlg.cpp b/host/tools/configtool/standalone/wxwin/platformeditordlg.cpp --- a/host/tools/configtool/standalone/wxwin/platformeditordlg.cpp +++ b/host/tools/configtool/standalone/wxwin/platformeditordlg.cpp @@ -83,7 +83,7 @@ BEGIN_EVENT_TABLE(ecPlatformEditorDialog EVT_BUTTON(wxID_OK, ecPlatformEditorDialog::OnOK) EVT_BUTTON(wxID_CANCEL, ecPlatformEditorDialog::OnCancel) EVT_COMBOBOX(ecID_MODIFY_PLATFORM_PREFIX, ecPlatformEditorDialog::OnChangeNewPlatformPrefix) - //EVT_TEXT(ecID_MODIFY_PLATFORM_NAME, ecPlatformEditorDialog::OnChangeNewPlatform) + EVT_TEXT(ecID_MODIFY_PLATFORM_NAME, ecPlatformEditorDialog::OnChangeNewPlatform) EVT_INIT_DIALOG(ecPlatformEditorDialog::OnInitDialog) END_EVENT_TABLE() @@ -115,7 +115,8 @@ void ecPlatformEditorDialog::OnInitDialo unsigned int i; for ( i=0 ; i < CeCosTestPlatform::Count() ; i++ ) { - comboBox->Append(CeCosTestPlatform::Get(i)->Prefix()); + if (wxNOT_FOUND == comboBox->FindString(CeCosTestPlatform::Get(i)->Prefix())) + comboBox->Append(CeCosTestPlatform::Get(i)->Prefix()); } wxDialog::OnInitDialog(event); @@ -234,14 +235,14 @@ void ecPlatformEditorDialog::CreateContr void ecPlatformEditorDialog::OnChangeNewPlatformPrefix(wxCommandEvent& event) { - TransferDataFromWindow(); - FindWindow(wxID_OK)->Enable(!m_strPlatform.IsEmpty() && !m_strPrefix.IsEmpty()); + FindWindow(wxID_OK)->Enable(!((wxTextCtrl*)FindWindow(ecID_MODIFY_PLATFORM_NAME))->GetValue().IsEmpty() && + !((wxComboBox*)FindWindow(ecID_MODIFY_PLATFORM_PREFIX))->GetValue().IsEmpty()); } void ecPlatformEditorDialog::OnChangeNewPlatform(wxCommandEvent& event) { - TransferDataFromWindow(); - FindWindow(wxID_OK)->Enable(!m_strPlatform.IsEmpty() && !m_strPrefix.IsEmpty()); + FindWindow(wxID_OK)->Enable(!((wxTextCtrl*)FindWindow(ecID_MODIFY_PLATFORM_NAME))->GetValue().IsEmpty() && + !((wxComboBox*)FindWindow(ecID_MODIFY_PLATFORM_PREFIX))->GetValue().IsEmpty()); } void ecPlatformEditorDialog::OnCancel(wxCommandEvent& event)