This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Fix population of configtool package lists
- From: John Dallaway <jld at ecoscentric dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Fri, 28 Mar 2003 12:02:51 +0000
- Subject: Fix population of configtool package lists
- Organization: eCosCentric Limited
This patch fixes a problem in the v2 configtool which prevents the last
eCos package defined in ecos.db being presented in the packages dialog.
[ Bugzilla 87520 ]
John Dallaway
eCosCentric Limited
--cut here--
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v
retrieving revision 1.43
diff -u -5 -r1.43 ChangeLog
--- ChangeLog 26 Mar 2003 12:08:37 -0000 1.43
+++ ChangeLog 28 Mar 2003 11:34:58 -0000
@@ -1,5 +1,10 @@
+2003-03-28 John Dallaway <jld at ecoscentric dot com>
+
+ * standalone/wxwin/packagesdlg.cpp: Fix population of package lists
+ to ensure the last package is seen. [ Bugzilla 87520 ]
+
2003-03-26 John Dallaway <jld at ecoscentric dot com>
* standalone/wxwin/makefile.gnu: Tidy up.
* standalone/wxwin/splittree.cpp: Fix wxRemotelyScrolledTreeCtrl for
Index: standalone/wxwin/packagesdlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/packagesdlg.cpp,v
retrieving revision 1.3
diff -u -5 -r1.3 packagesdlg.cpp
--- standalone/wxwin/packagesdlg.cpp 15 Dec 2001 13:42:19 -0000 1.3
+++ standalone/wxwin/packagesdlg.cpp 28 Mar 2003 11:35:05 -0000
@@ -1,9 +1,10 @@
//####COPYRIGHTBEGIN####
//
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+// Copyright (C) 2003 John Dallaway
//
// This program is part of the eCos host tools.
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
@@ -25,11 +26,11 @@
// packages :
//
//===========================================================================
//#####DESCRIPTIONBEGIN####
//
-// Author(s): julians
+// Author(s): julians, jld
// Contact(s): julians
// Date: 2000/09/28
// Version: $Id: packagesdlg.cpp,v 1.9 2001/12/14 17:34:03 julians Exp $
// Purpose:
// Description: Implementation file for ecPackagesDialog
@@ -125,11 +126,11 @@
wxSizer *item0 = new wxBoxSizer( wxVERTICAL );
wxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );
wxSizer *item2 = new wxBoxSizer( wxVERTICAL );
-
+
wxStaticText *item3 = new wxStaticText( parent, wxID_STATIC, _("Available &packages:"), wxDefaultPosition, wxDefaultSize, 0 );
item2->Add( item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxString *strs4 = (wxString*) NULL;
wxListBox *item4 = new wxListBox( parent, ecID_PACKAGES_DIALOG_AVAILABLE_LIST, wxDefaultPosition, wxSize(230,190), 0, strs4, wxLB_SORT|wxLB_HSCROLL );
@@ -223,11 +224,11 @@
wxButton *item6 = new wxButton( parent, ecID_PACKAGES_DIALOG_ADD, _("&Add >>"), wxDefaultPosition, wxDefaultSize, 0 );
item5->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 );
wxButton *item7 = new wxButton( parent, ecID_PACKAGES_DIALOG_REMOVE, _("<< &Remove"), wxDefaultPosition, wxDefaultSize, 0 );
item5->Add( item7, 0, wxALIGN_CENTRE|wxALL, 5 );
-
+
item1->Add( item5, 0, wxALIGN_CENTRE|wxALL, 0 );
wxSizer *item8 = new wxBoxSizer( wxVERTICAL );
wxStaticText *item9 = new wxStaticText( parent, wxID_STATIC, _("&Use these packages:"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -272,11 +273,11 @@
item18->Add( 20, 20, 1, wxALIGN_CENTRE|wxALL, 5 );
wxButton *item20 = new wxButton( parent, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
item20->SetDefault();
item18->Add( item20, 0, wxALIGN_CENTRE|wxALL, 5 );
-
+
wxButton *item21 = new wxButton( parent, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
item18->Add( item21, 0, wxALIGN_CENTRE|wxALL, 5 );
item0->Add( item18, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
#endif
@@ -385,11 +386,11 @@
{
keywords.Add(tok.GetNextToken());
}
// Initialize the controls
- for (i = 0; i < GetCount()-1; i++)
+ for (i = 0; i < GetCount(); i++)
{
const wxString& str = m_items[i];
wxListBox* lb = m_arnItems[i] ? useList : availableList;
wxString macroName(pDoc->GetPackageName (str));