Mercurial > ecos-v3_0-branch
changeset 647:bf939f3a422a
* standalone/wxwin/platformeditordlg.cpp:
Fix erroneously disabled OK button and duplicate entries in prefix list.
| author | jld |
|---|---|
| date | Wed, 19 Feb 2003 16:15:37 +0000 |
| parents | 9af89f295088 |
| children | 0c5540a10fcc |
| files | host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/platformeditordlg.cpp |
| diffstat | 2 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog +++ b/host/tools/configtool/ChangeLog @@ -1,5 +1,8 @@ 2003-02-19 John Dallaway <jld@ecoscentric.com> + * 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
--- 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)
