changeset 2466:480aa5d146e3

* configtool/standalone/wxwin/admindlg.cpp, configtool/standalone/wxwin/appsettings.cpp, configtool/standalone/wxwin/configitem.cpp, configtool/standalone/wxwin/configtool.cpp, configtool/standalone/wxwin/configtooldoc.cpp, configtool/standalone/wxwin/configtooldoc.h, configtool/standalone/wxwin/configtoolview.cpp, configtool/standalone/wxwin/configtree.cpp, configtool/standalone/wxwin/conflictsdlg.cpp, configtool/standalone/wxwin/docsystem.cpp, configtool/standalone/wxwin/ecscrolwin.cpp, configtool/standalone/wxwin/ecscrolwin.h, configtool/standalone/wxwin/ecutils.cpp, configtool/standalone/wxwin/ecutils.h, configtool/standalone/wxwin/filename.cpp, configtool/standalone/wxwin/filename.h, configtool/standalone/wxwin/folderdlg.cpp, configtool/standalone/wxwin/mainwin.cpp, configtool/standalone/wxwin/makefile.gnu, configtool/standalone/wxwin/packagesdlg.cpp, configtool/standalone/wxwin/packagesdlg.h, configtool/standalone/wxwin/platformsdlg.cpp, configtool/standalone/wxwin/platformsdlg.h, configtool/standalone/wxwin/splittree.cpp: Changes to allow building against wxWidgets 2.6.x.
author jld
date Wed, 26 Mar 2008 13:15:44 +0000
parents dbff0fb46d3b
children b75acb19f177
files host/tools/configtool/ChangeLog host/tools/configtool/standalone/wxwin/admindlg.cpp host/tools/configtool/standalone/wxwin/appsettings.cpp host/tools/configtool/standalone/wxwin/configitem.cpp host/tools/configtool/standalone/wxwin/configtool.cpp host/tools/configtool/standalone/wxwin/configtooldoc.cpp host/tools/configtool/standalone/wxwin/configtooldoc.h host/tools/configtool/standalone/wxwin/configtoolview.cpp host/tools/configtool/standalone/wxwin/configtree.cpp host/tools/configtool/standalone/wxwin/conflictsdlg.cpp host/tools/configtool/standalone/wxwin/docsystem.cpp host/tools/configtool/standalone/wxwin/ecscrolwin.cpp host/tools/configtool/standalone/wxwin/ecscrolwin.h host/tools/configtool/standalone/wxwin/ecutils.cpp host/tools/configtool/standalone/wxwin/ecutils.h host/tools/configtool/standalone/wxwin/filename.cpp host/tools/configtool/standalone/wxwin/filename.h host/tools/configtool/standalone/wxwin/folderdlg.cpp host/tools/configtool/standalone/wxwin/mainwin.cpp host/tools/configtool/standalone/wxwin/makefile.gnu host/tools/configtool/standalone/wxwin/packagesdlg.cpp host/tools/configtool/standalone/wxwin/packagesdlg.h host/tools/configtool/standalone/wxwin/platformsdlg.cpp host/tools/configtool/standalone/wxwin/platformsdlg.h host/tools/configtool/standalone/wxwin/splittree.cpp
diffstat 25 files changed, 520 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog
+++ b/host/tools/configtool/ChangeLog
@@ -18,6 +18,34 @@ 2006-07-11  John Dallaway  <jld@ecoscent
 	* standalone/wxwin/configtool.cpp: Workaround an exception handling
 	issue with Cygwin 1.5.20.
 
+2006-05-01  Andy Jackson  <andy@xylanta.com>
+
+	* standalone/wxwin/admindlg.cpp,
+	standalone/wxwin/appsettings.cpp,
+	standalone/wxwin/configitem.cpp,
+	standalone/wxwin/configtool.cpp,
+	standalone/wxwin/configtooldoc.cpp,
+	standalone/wxwin/configtooldoc.h,
+	standalone/wxwin/configtoolview.cpp,
+	standalone/wxwin/configtree.cpp,
+	standalone/wxwin/conflictsdlg.cpp,
+	standalone/wxwin/docsystem.cpp,
+	standalone/wxwin/ecscrolwin.cpp,
+	standalone/wxwin/ecscrolwin.h,
+	standalone/wxwin/ecutils.cpp,
+	standalone/wxwin/ecutils.h,
+	standalone/wxwin/filename.cpp,
+	standalone/wxwin/filename.h,
+	standalone/wxwin/folderdlg.cpp,
+	standalone/wxwin/mainwin.cpp,
+	standalone/wxwin/makefile.gnu,
+	standalone/wxwin/packagesdlg.cpp,
+	standalone/wxwin/packagesdlg.h,
+	standalone/wxwin/platformsdlg.cpp,
+	standalone/wxwin/platformsdlg.h,
+	standalone/wxwin/splittree.cpp: Changes to allow building
+	against current wxWidgets version (2.6.x).
+
 2005-07-09  Bart Veer  <bartv@ecoscentric.com>
 
 	* common/common/build.cxx: add support for C++ files that use a
--- a/host/tools/configtool/standalone/wxwin/admindlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/admindlg.cpp
@@ -323,7 +323,12 @@ void ecAdminDialog::OnRemove(wxCommandEv
         wxString pstrPackage(data->m_string);
         
         bool bStatus = TRUE;
+#if wxCHECK_VERSION(2, 6, 0)
+		wxTreeItemIdValue cookie;
+#else
         long cookie;
+#endif
+
         wxTreeItemId hChildItem = treeCtrl->GetFirstChild (hTreeItem, cookie);
         while (hChildItem && bStatus)
         {
--- a/host/tools/configtool/standalone/wxwin/appsettings.cpp
+++ b/host/tools/configtool/standalone/wxwin/appsettings.cpp
@@ -70,6 +70,7 @@
 #include "outputwin.h"
 #include "shortdescrwin.h"
 #include "mainwin.h"
+#include "filename.h"
 
 // For SystemInfo
 #ifdef __WXMSW__
@@ -514,7 +515,11 @@ bool ecSettings::LoadConfig()
                 m_userToolPaths[i] = str;
             } else
             {
+#if wxCHECK_VERSION(2, 6, 0)
+                m_userToolPaths.RemoveAt(i);
+#else
                 m_userToolPaths.Remove(i);
+#endif
                 i--;
             }
         }
@@ -532,7 +537,11 @@ bool ecSettings::LoadConfig()
                 m_userToolPaths[i] = str;
             } else
             {
+#if wxCHECK_VERSION(2, 6, 0)
+                m_userToolPaths.RemoveAt(i);
+#else
                 m_userToolPaths.Remove(i);
+#endif
                 i--;
             }
         }
@@ -767,7 +776,7 @@ const ecFileName& ecSettings::DefaultExt
 #ifdef __WXMSW__
     static bool bFirstTime=TRUE;
     if(bFirstTime){
-        const ecFileName strFile(ecFileName::GetTempPath()+wxT("index.html"));
+        const ecFileName strFile(ecFileName::EC_GetTempPath()+wxT("index.html"));
         wxFile f;
         if(f.Create(strFile, TRUE))
         {
--- a/host/tools/configtool/standalone/wxwin/configitem.cpp
+++ b/host/tools/configtool/standalone/wxwin/configitem.cpp
@@ -238,8 +238,13 @@ bool ecConfigItem::UpdateTreeItem(ecConf
 {
     treeCtrl.SetItemText(m_treeItem, m_name);
 
+#if wxCHECK_VERSION(2, 6, 0)
+    static wxColour normalColour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+    static wxColour disabledColour = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
+#else
     static wxColour normalColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT);
     static wxColour disabledColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_GRAYTEXT);
+#endif
 
     treeCtrl.SetItemTextColour(m_treeItem, GetActive() ? normalColour : disabledColour);
     
@@ -710,6 +715,21 @@ bool ecConfigItem::Unload()
 
     wxGetApp().GetTreeCtrl()->Delete(GetTreeItem());
 
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode* node = pDoc->GetItems().GetFirst();
+    while (node)
+    {
+        ecConfigItem* item = wxDynamicCast(node->GetData(), ecConfigItem);
+        if (package == item->GetOwnerPackage())
+        {
+            item->SetTreeItem(wxTreeItemId()); // Make sure we can't attempt to paint it
+            item->SetCdlItem(NULL); // Make sure we can't access stale data
+            pDoc->GetItems().DeleteObject(this); // Delete from the item list
+            delete item; // Delete the item itself
+        }
+        node = node->GetNext();
+    }
+#else
     wxNode* node = pDoc->GetItems().First();
     while (node)
     {
@@ -723,6 +743,7 @@ bool ecConfigItem::Unload()
         }
         node = node->Next();
     }
+#endif
 
     const wxString strMacroName(GetMacro());
     //TRACE (wxT("Unloading package %s\n"), strMacroName);
@@ -884,7 +905,11 @@ ecConfigItem *ecConfigItem::FirstChild()
 { 
     ecConfigTreeCtrl* treeCtrl = wxGetApp().GetTreeCtrl();
 
-    long cookie;
+#if wxCHECK_VERSION(2, 6, 0)
+		wxTreeItemIdValue cookie;
+#else
+        long cookie;
+#endif
     wxTreeItemId hChild=treeCtrl->GetFirstChild(GetTreeItem(), cookie);
     if (hChild)
     {
--- a/host/tools/configtool/standalone/wxwin/configtool.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtool.cpp
@@ -302,7 +302,13 @@ bool ecApp::OnInit()
     m_mainFrame = frame;
     SetTopWindow(frame);
     frame->Show(TRUE);
+
+#if wxCHECK_VERSION(2, 6, 0)
+	// Don't do anything for now as the function is only for wxWidgets internal use
+#else
     SendIdleEvents(); // Otherwise UI updates aren't done, because it's busy loading the repository
+#endif
+
 #ifdef __WXMSW__
     ::UpdateWindow((HWND) frame->GetHWND());
 #endif
@@ -895,7 +901,10 @@ void ecApp::Log(const wxString& msg)
         if ((msg == wxEmptyString) || (msg.Last() != wxT('\n')))
             frame->GetOutputWindow()->AppendText(wxT("\n"));
 
-//        frame->GetOutputWindow()->ShowPosition(frame->GetOutputWindow()->GetLastPosition());
+#ifdef __CYGWIN__
+		// Seem to need this under Cygwin to force the last insert point to show
+		frame->GetOutputWindow()->ShowPosition(frame->GetOutputWindow()->GetLastPosition());
+#endif
     }
 }
 
--- a/host/tools/configtool/standalone/wxwin/configtooldoc.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtooldoc.cpp
@@ -121,12 +121,21 @@ ecConfigToolDoc::~ecConfigToolDoc()
 
 void ecConfigToolDoc::DeleteItems()
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    // Delete any remaining items
+    wxNode* node = m_items.GetFirst();
+    while (node)
+    {
+        ecConfigItem* item = wxDynamicCast(node->GetData(), ecConfigItem);
+        wxNode* next = node->GetNext();
+#else
     // Delete any remaining items
     wxNode* node = m_items.First();
     while (node)
     {
         ecConfigItem* item = wxDynamicCast(node->Data(), ecConfigItem);
         wxNode* next = node->Next();
+#endif
 
         // Note: automatically removes itself from this list in ~ecConfigItem
         delete item;
@@ -297,7 +306,7 @@ bool ecConfigToolDoc::OnSaveDocument(con
 
             if (!wxGetApp().GetSettings().m_editSaveFileOnly)
             {
-                if (!buildFilename.CreateDirectory(FALSE) || !installFilename.CreateDirectory(FALSE))
+                if (!buildFilename.EC_CreateDirectory(FALSE) || !installFilename.EC_CreateDirectory(FALSE))
                 {
                     wxString msg;
                     msg.Printf(_("Failed to save %s"), (const wxChar*) filename);
@@ -363,7 +372,7 @@ bool ecConfigToolDoc::GenerateBuildTree(
         ecFileName buildFilename(m_strBuildTree);
         ecFileName installFilename(m_strInstallTree);
         
-        if (!buildFilename.CreateDirectory() || !installFilename.CreateDirectory())
+        if (!buildFilename.EC_CreateDirectory() || !installFilename.EC_CreateDirectory())
         {
             wxString msg;
             msg.Printf(_("Failed to create build tree"));
@@ -510,7 +519,12 @@ void ecConfigToolDoc::AddAllItems()
 
     UpdateAllViews (NULL, & hint);
 
-    if(GetItems().Number()>0){
+#if wxCHECK_VERSION(2, 6, 0)
+    if(GetItems().GetCount() > 0)
+#else
+    if(GetItems().Number() > 0)
+#endif
+	{
         wxGetApp().GetTreeCtrl()->Expand(rootId);
     }
     wxGetApp().GetTreeCtrl()->SetFocus();
@@ -603,7 +617,11 @@ ecConfigItem * ecConfigToolDoc::AddItem 
 void ecConfigToolDoc::CheckRadios()
 {
     int nItem;
+#if wxCHECK_VERSION(2, 6, 0)
+    for(nItem=0; nItem < GetItems().GetCount() ; nItem++)
+#else
     for(nItem=0; nItem < GetItems().Number() ; nItem++)
+#endif
     {
         ecConfigItem *pItem=(ecConfigItem*) GetItems()[nItem];
 
@@ -648,7 +666,11 @@ void ecConfigToolDoc::CheckRadios()
 ecConfigItem * ecConfigToolDoc::Find (CdlValuable v)
 {
     int nItem;
+#if wxCHECK_VERSION(2, 6, 0)
+    for (nItem=0 ; nItem < m_items.GetCount() ; nItem++)
+#else
     for (nItem=0 ; nItem < m_items.Number() ; nItem++)
+#endif
     {
         ecConfigItem *pItem = (ecConfigItem*) m_items[nItem];
         if( v == pItem->GetCdlValuable() )
@@ -662,7 +684,11 @@ ecConfigItem * ecConfigToolDoc::Find (Cd
 ecConfigItem * ecConfigToolDoc::Find(const wxString & strWhat, ecWhereType where)
 {
     int nItem;
+#if wxCHECK_VERSION(2, 6, 0)
+    for (nItem=0 ; nItem < m_items.GetCount() ; nItem++)
+#else
     for (nItem=0 ; nItem < m_items.Number() ; nItem++)
+#endif
     {
         ecConfigItem *pItem = (ecConfigItem*) m_items[nItem];
         if (pItem->StringValue(where) == strWhat)
@@ -1642,6 +1668,15 @@ ecConfigToolDoc::GlobalConflictOutcome e
     m_arConflictsOfInterest.Clear();
     if(parConflictsOfInterest)
     {
+#if wxCHECK_VERSION(2, 6, 0)
+        wxNode* node = parConflictsOfInterest->GetFirst();
+        while (node)
+        {
+            wxObject* obj = (wxObject*) node->GetData();
+            m_arConflictsOfInterest.Append(obj);
+            node = node->GetNext();
+        }
+#else
         wxNode* node = parConflictsOfInterest->First();
         while (node)
         {
@@ -1649,6 +1684,7 @@ ecConfigToolDoc::GlobalConflictOutcome e
             m_arConflictsOfInterest.Append(obj);
             node = node->Next();
         }
+#endif
     }
     CdlInferenceCallback fn=CdlTransactionBody::get_inference_callback_fn();
     CdlTransactionBody::set_inference_callback_fn(CdlGlobalInferenceHandler);
@@ -1929,7 +1965,7 @@ bool ecConfigToolDoc::GenerateHeaders()
         ecFileName strPkfConfDir(GetInstallTree());
         strPkfConfDir += ecFileName(wxT("include"));
         strPkfConfDir += ecFileName(wxT("pkgconf"));
-        if ( !strPkfConfDir.CreateDirectory())
+        if ( !strPkfConfDir.EC_CreateDirectory())
         {
             wxString msg;
             msg.Printf(_("Failed to create %s"), (const wxChar*) strPkfConfDir);
@@ -2011,11 +2047,11 @@ bool ecConfigToolDoc::SaveMemoryMap()
     strMLTInstallPkgconfDir = strMLTInstallPkgconfDir + ecFileName(wxT("pkgconf"));
 
     bool rc=false;
-    if(strMLTInstallPkgconfDir.CreateDirectory(true)){
+    if(strMLTInstallPkgconfDir.EC_CreateDirectory(TRUE)){
         const wxString strMLTInstallBase(strMLTInstallPkgconfDir+ecFileName(strSuffix));
         const ecFileName strMLTDir (MLTDir());
 
-        if(strMLTDir.CreateDirectory (TRUE))
+        if(strMLTDir.EC_CreateDirectory (TRUE))
         {
             const wxString strMLTBase (strMLTDir + ecFileName (strSuffix));
             // TRACE(_T("Saving memory layout to %s\n"), strMLTBase + _T(".mlt"));
@@ -2042,7 +2078,7 @@ bool ecConfigToolDoc::CopyMLTFiles()
     const ecFileName strMLTDestination (MLTDir ());
     // TRACE (_T("Copying .ldi and .h files to %s\n"), strInstallDestination);
     // TRACE (_T("Copying .mlt files to %s\n"), strMLTDestination);
-    bool rc=strInstallDestination.CreateDirectory ( TRUE ) && strMLTDestination.CreateDirectory ( TRUE );
+    bool rc=strInstallDestination.EC_CreateDirectory ( TRUE ) && strMLTDestination.EC_CreateDirectory ( TRUE );
     if (rc)
     {
         wxDir ffFileFind;
@@ -2101,8 +2137,13 @@ const wxString ecConfigToolDoc::CurrentM
 
 bool ecConfigToolDoc::ExportFile()
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    wxFileDialog dialog(wxGetApp().GetTopWindow(), _("Export eCos Minimal Configuration"),
+        wxT(""), wxT(""), wxT("eCos Minimal Configuration (*.ecm)|*.ecm"), wxSAVE|wxOVERWRITE_PROMPT);
+#else
     wxFileDialog dialog(wxGetApp().GetTopWindow(), _("Export eCos Minimal Configuration"),
         wxT(""), wxT(""), wxT("eCos Minimal Configuration (*.ecm)|*.ecm"), wxSAVE|wxOVERWRITE_PROMPT|wxHIDE_READONLY);
+#endif
 
     if (dialog.ShowModal() == wxID_OK)
     {
@@ -2130,8 +2171,13 @@ bool ecConfigToolDoc::ExportFile()
 
 bool ecConfigToolDoc::ImportFile()
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    wxFileDialog dialog(wxGetApp().GetTopWindow(), _("Import eCos Minimal Configuration"),
+        wxT(""), wxT(""), wxT("eCos Minimal Configuration (*.ecm)|*.ecm"), wxOPEN|wxFILE_MUST_EXIST);
+#else
     wxFileDialog dialog(wxGetApp().GetTopWindow(), _("Import eCos Minimal Configuration"),
         wxT(""), wxT(""), wxT("eCos Minimal Configuration (*.ecm)|*.ecm"), wxOPEN|wxFILE_MUST_EXIST|wxHIDE_READONLY);
+#endif
 
     if (dialog.ShowModal() == wxID_OK)
     {
--- a/host/tools/configtool/standalone/wxwin/configtooldoc.h
+++ b/host/tools/configtool/standalone/wxwin/configtooldoc.h
@@ -119,7 +119,11 @@ public:
 
     CdlBuildInfo& GetBuildInfo() { return m_BuildInfo; }
 
+#if wxCHECK_VERSION(2, 6, 0)
+    ecConfigItem* GetFirstItem() { return (m_items.GetCount() == 0 ? (ecConfigItem*) NULL : (ecConfigItem*) m_items.GetFirst()->GetData()); }
+#else
     ecConfigItem* GetFirstItem() { return (m_items.Number() == 0 ? (ecConfigItem*) NULL : (ecConfigItem*) m_items.First()->Data()); }
+#endif
 
     const wxString GetCurrentTargetPrefix();
 
--- a/host/tools/configtool/standalone/wxwin/configtoolview.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtoolview.cpp
@@ -159,7 +159,11 @@ void ecConfigToolView::OnUpdate(wxView *
         
         {
             int nItem;
+#if wxCHECK_VERSION(2, 6, 0)
+            for(nItem=0;nItem<pDoc->GetItems().GetCount();nItem++)
+#else
             for(nItem=0;nItem<pDoc->GetItems().Number();nItem++)
+#endif
             {
                 ecConfigItem *pItem = (ecConfigItem*) pDoc->GetItems()[nItem];
                 wxTreeItemId treeItem = pItem->GetTreeItem();
@@ -195,7 +199,11 @@ void ecConfigToolView::OnUpdate(wxView *
     case ecNameFormatChanged:
         {
             int nItem;
+#if wxCHECK_VERSION(2, 6, 0)
+            for(nItem=0;nItem<pDoc->GetItems().GetCount();nItem++)
+#else
             for(nItem=0;nItem<pDoc->GetItems().Number();nItem++)
+#endif
             {
                 ecConfigItem *pItem = (ecConfigItem*) pDoc->GetItems()[nItem];
                 wxString strName(pItem->GetItemNameOrMacro());
@@ -264,7 +272,11 @@ void ecConfigToolView::OnUpdate(wxView *
     case ecExternallyChanged:
         {
             int nItem;
+#if wxCHECK_VERSION(2, 6, 0)
+            for(nItem=0;nItem<pDoc->GetItems().GetCount();nItem++)
+#else
             for(nItem=0;nItem<pDoc->GetItems().Number();nItem++)
+#endif
             {
                 ecConfigItem *pItem = (ecConfigItem*) pDoc->GetItems()[nItem];
                 pItem->UpdateTreeItem(* treeCtrl);
@@ -382,8 +394,11 @@ ecConfigItem *ecConfigToolView::DoFind(c
     ecConfigToolDoc *pDoc = wxGetApp().GetConfigToolDoc();
     if (!pDoc)
         return NULL;
-
+#if wxCHECK_VERSION(2, 6, 0)
+    int nCount = pDoc->GetItems().GetCount();
+#else
     int nCount = pDoc->GetItems().Number();
+#endif
 
     // static LPCTSTR arWhereImage[]={_T("name"),_T("macro"),_T("description string"),_T("current value"),_T("default value")};
     
@@ -458,7 +473,9 @@ ecConfigItem *ecConfigToolView::DoFind(c
 
         wxTreeItemId h=pItem->GetTreeItem();
         // Is h visible?
+
         wxTreeItemId hv;
+
         for(hv=wxGetApp().GetTreeCtrl()->GetFirstVisibleItem();hv;hv=wxGetApp().GetTreeCtrl()->GetNextVisible(hv))
         {
             if(hv==h)
@@ -466,7 +483,12 @@ ecConfigItem *ecConfigToolView::DoFind(c
                 break;
             }
         }
+
+#if wxCHECK_VERSION(2, 6, 0)
+        if (!hv.IsOk())
+#else
         if (0==hv)
+#endif
         {
             // we want to record the highest unexpanded item
             for(hv=wxGetApp().GetTreeCtrl()->GetItemParent(h);hv;hv=wxGetApp().GetTreeCtrl()->GetItemParent(hv))
--- a/host/tools/configtool/standalone/wxwin/configtree.cpp
+++ b/host/tools/configtool/standalone/wxwin/configtree.cpp
@@ -259,15 +259,19 @@ ecConfigTreeCtrl::~ecConfigTreeCtrl()
 void ecConfigTreeCtrl::OnPaint(wxPaintEvent& event)
 {
     wxPaintDC dc(this);
-    
+
     wxTreeCtrl::OnPaint(event);
     
     // Reset the device origin since it may have been set
     dc.SetDeviceOrigin(0, 0);
     
     wxSize sz = GetClientSize();
-    
+
+#if wxCHECK_VERSION(2, 6, 0)
+    wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+#else
     wxPen pen(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+#endif
     dc.SetPen(pen);
     dc.SetBrush(* wxTRANSPARENT_BRUSH);
     
@@ -307,7 +311,11 @@ void ecConfigTreeCtrl::OnMouseEvent(wxMo
     int flags = 0;
     wxTreeItemId item = HitTest(wxPoint(event.GetX(), event.GetY()), flags);
     
+#if wxCHECK_VERSION(2, 6, 0)
+    if (!item.IsOk())
+#else
     if (item == 0 || !item.IsOk())
+#endif
     {
         if (event.RightDown())
             PopupMenu(wxGetApp().GetWhatsThisMenu(), event.GetX(), event.GetY());
@@ -446,7 +454,11 @@ ecValueWindow::ecValueWindow(wxWindow* p
                              long style):
 wxTreeCompanionWindow(parent, id, pos, sz, style)
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX));
+#else
     SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_LISTBOX));
+#endif
 
     if (!wxGetApp().GetSettings().GetWindowSettings().GetUseDefaults() &&
          wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Configuration")).Ok())
@@ -454,8 +466,11 @@ wxTreeCompanionWindow(parent, id, pos, s
         SetFont(wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Configuration")));
     }
     else
+#if wxCHECK_VERSION(2, 6, 0)
+        SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
+#else
         SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
-
+#endif
     
     m_editWindow = NULL;
     m_configItem = NULL;
@@ -467,8 +482,12 @@ void ecValueWindow::OnPaint(wxPaintEvent
     
     if (!m_treeCtrl)
         return;
-    
+
+#if wxCHECK_VERSION(2, 6, 0)
+    wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+#else
     wxPen pen(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+#endif
     dc.SetPen(pen);
     dc.SetBrush(* wxTRANSPARENT_BRUSH);
     wxFont font(GetFont());
@@ -549,7 +568,11 @@ void ecValueWindow::OnMouseEvent(wxMouse
         // Find if this corresponds to a tree item
         int flags = 0;
         wxTreeItemId item = m_treeCtrl->HitTest(wxPoint(4, event.GetY()), flags);
+#if wxCHECK_VERSION(2, 6, 0)
+        if (item.IsOk())
+#else
         if (item != 0)
+#endif
         {
             ecConfigItem* configItem = ((ecTreeItemData*) m_treeCtrl->GetItemData(item))->GetConfigItem();
             m_treeCtrl->SelectItem(item);
@@ -575,9 +598,14 @@ void ecValueWindow::DrawItem(wxDC& dc, w
         
         if (text.IsEmpty())
             return;
-        
+
+#if wxCHECK_VERSION(2, 6, 0)
+        static wxColour normalColour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+        static wxColour disabledColour = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
+#else
         static wxColour normalColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT);
         static wxColour disabledColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_GRAYTEXT);
+#endif
         dc.SetTextForeground( (item->GetActive() && (item->GetConfigType() != ecPackage)) ? normalColour : disabledColour );
         
         int textW, textH;
@@ -732,6 +760,15 @@ bool wxIconStateInfoDB::AddInfo(const wx
 
 wxIconStateInfo* wxIconStateInfoDB::FindInfo(const wxString& name) const
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode* node = GetFirst();
+    while (node)
+    {
+        wxIconStateInfo* info = (wxIconStateInfo*) node->GetData();
+        if (info->GetName() == name)
+            return info;
+        node = node->GetNext();
+#else
     wxNode* node = First();
     while (node)
     {
@@ -739,6 +776,7 @@ wxIconStateInfo* wxIconStateInfoDB::Find
         if (info->GetName() == name)
             return info;
         node = node->Next();
+#endif
     }
     return NULL;
 }
@@ -819,7 +857,11 @@ void ecSplitterScrolledWindow::OnWhatsTh
     wxASSERT (treeCtrl != NULL) ;
 
     wxTreeItemId id = treeCtrl->GetSelection();
+#if wxCHECK_VERSION(2, 6, 0)
+    if (id.IsOk() && ecIsMenuForItem(event))
+#else
     if (id != 0 && ecIsMenuForItem(event))
+#endif
     {
         ecConfigItem* item = ((ecTreeItemData*) treeCtrl->GetItemData(id))->GetConfigItem();
         
@@ -850,7 +892,11 @@ void ecSplitterScrolledWindow::OnPropert
     wxASSERT (treeCtrl != NULL) ;
     
     wxTreeItemId id = treeCtrl->GetSelection();
+#if wxCHECK_VERSION(2, 6, 0)
+    if (id.IsOk() && ecIsMenuForItem(event))
+#else
     if (id != 0 && ecIsMenuForItem(event))
+#endif
     {
         ecConfigItem* item = ((ecTreeItemData*) treeCtrl->GetItemData(id))->GetConfigItem();
         
@@ -866,7 +912,11 @@ void ecSplitterScrolledWindow::OnRestore
     wxASSERT (treeCtrl != NULL) ;
     
     wxTreeItemId id = treeCtrl->GetSelection();
+#if wxCHECK_VERSION(2, 6, 0)
+    if (id.IsOk() && ecIsMenuForItem(event))
+#else
     if (id != 0 && ecIsMenuForItem(event))
+#endif
     {
         ecConfigItem* item = ((ecTreeItemData*) treeCtrl->GetItemData(id))->GetConfigItem();
         if (item->HasModifiedChildren())
@@ -932,7 +982,11 @@ void ecSplitterScrolledWindow::RestoreDe
     
     if (bRecurse)
     {
+#if wxCHECK_VERSION(2, 6, 0)
+		wxTreeItemIdValue cookie;
+#else
         long cookie;
+#endif
         for (h = treeCtrl->GetFirstChild(h, cookie); h; h = treeCtrl->GetNextSibling(h))
         {
             RestoreDefault (h, TRUE, FALSE);
@@ -946,7 +1000,11 @@ void ecSplitterScrolledWindow::OnVisitDo
     wxASSERT (treeCtrl != NULL) ;
 
     wxTreeItemId id = treeCtrl->GetSelection();
+#if wxCHECK_VERSION(2, 6, 0)
+    if (id.IsOk() && ecIsMenuForItem(event))
+#else
     if (id != 0 && ecIsMenuForItem(event))
+#endif
     {
         ecConfigItem* item = ((ecTreeItemData*) treeCtrl->GetItemData(id))->GetConfigItem();
         
@@ -962,7 +1020,11 @@ void ecSplitterScrolledWindow::OnViewHea
     wxASSERT (treeCtrl != NULL) ;
 
     wxTreeItemId id = treeCtrl->GetSelection();
+#if wxCHECK_VERSION(2, 6, 0)
+    if (id.IsOk() && ecIsMenuForItem(event))
+#else
     if (id != 0 && ecIsMenuForItem(event))
+#endif
     {
         ecConfigItem* item = ((ecTreeItemData*) treeCtrl->GetItemData(id))->GetConfigItem();
         
@@ -978,7 +1040,11 @@ void ecSplitterScrolledWindow::OnUnloadP
     wxASSERT (treeCtrl != NULL) ;
 
     wxTreeItemId id = treeCtrl->GetSelection();
+#if wxCHECK_VERSION(2, 6, 0)
+    if (id.IsOk())
+#else
     if (id != 0)
+#endif
     {
         ecConfigItem* item = ((ecTreeItemData*) treeCtrl->GetItemData(id))->GetConfigItem();
         
@@ -997,7 +1063,11 @@ void ecSplitterScrolledWindow::OnUpdateR
     wxASSERT (treeCtrl != NULL) ;
 
     wxTreeItemId id = treeCtrl->GetSelection();
+#if wxCHECK_VERSION(2, 6, 0)
+    if (id.IsOk())
+#else
     if (id != 0)
+#endif
     {
         ecConfigItem* item = ((ecTreeItemData*) treeCtrl->GetItemData(id))->GetConfigItem();
         
@@ -1022,7 +1092,11 @@ void ecSplitterScrolledWindow::OnUpdateU
     wxASSERT (treeCtrl != NULL) ;
 
     wxTreeItemId id = treeCtrl->GetSelection();
+#if wxCHECK_VERSION(2, 6, 0)
+    if (id.IsOk())
+#else
     if (id != 0)
+#endif
     {
         ecConfigItem* item = ((ecTreeItemData*) treeCtrl->GetItemData(id))->GetConfigItem();
         
@@ -1040,7 +1114,11 @@ bool ecSplitterScrolledWindow::IsChanged
 
     if(!rc && bRecurse)
     {
+#if wxCHECK_VERSION(2, 6, 0)
+		wxTreeItemIdValue cookie;
+#else
         long cookie;
+#endif
         for (id=treeCtrl->GetFirstChild(id, cookie);id;id=treeCtrl->GetNextSibling(id))
         {
             if (IsChanged(id,TRUE))
--- a/host/tools/configtool/standalone/wxwin/conflictsdlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/conflictsdlg.cpp
@@ -128,10 +128,17 @@ ecResolveConflictsDialog::ecResolveConfl
 ecResolveConflictsDialog::~ecResolveConflictsDialog()
 {
     m_Map.BeginFind();
+#if wxCHECK_VERSION(2, 6, 0)
+    wxHashTable::Node* node = NULL;
+    while ((node = m_Map.Next()))
+    {
+        SolutionInfo *pInfo = (SolutionInfo*) node->GetData();
+#else
     wxNode* node = NULL;
     while ((node = m_Map.Next()))
     {
         SolutionInfo *pInfo = (SolutionInfo*) node->Data();
+#endif
         free(pInfo);
     }
     m_Map.Clear();
@@ -215,14 +222,22 @@ void ecResolveConflictsDialog::OnInitDia
 
     // Select the first item and fill the solution set
     m_conflictsCtrl->AddConflicts(m_conflicts);
-    
+
+#if wxCHECK_VERSION(2, 6, 0)
+    if (m_parConflictsOfInterest && m_parConflictsOfInterest->GetCount()>0)
+#else
     if (m_parConflictsOfInterest && m_parConflictsOfInterest->Number()>0)
+#endif
     {
         wxList &arConflictsOfInterest = *m_parConflictsOfInterest;
         int i, j;
         for ( i = m_conflictsCtrl->GetItemCount() - 1; i >= 0; --i )
         {
+#if wxCHECK_VERSION(2, 6, 0)
+            for ( j = arConflictsOfInterest.GetCount() - 1; j>=0; --j )
+#else
             for ( j = arConflictsOfInterest.Number() - 1; j>=0; --j )
+#endif
             {
                 CdlConflict conflict = (CdlConflict)m_conflictsCtrl->GetItemData(i);
                 if ( ((CdlConflict) arConflictsOfInterest[j]) == conflict )
--- a/host/tools/configtool/standalone/wxwin/docsystem.cpp
+++ b/host/tools/configtool/standalone/wxwin/docsystem.cpp
@@ -628,12 +628,25 @@ bool ecHtmlIndexer::DoIndexDocs(const wx
 
     // Pop up a progress dialog
     wxProgressDialog dialog(wxGetApp().GetSettings().GetAppName(),
+#if wxCHECK_VERSION(2, 6, 0)
+        _("Compiling documentation index..."), m_indexItems.GetCount(),
+#else
         _("Compiling documentation index..."), m_indexItems.Number(),
+#endif
         wxGetApp().GetTopWindow());
     
     CreateHHCWriteHeader(stream);
 
     int count = 1;
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode* node = m_indexItems.GetFirst();
+    while (node)
+    {
+        dialog.Update(count);
+        count ++;
+
+        ecIndexItem* item = (ecIndexItem*) node->GetData();
+#else
     wxNode* node = m_indexItems.First();
     while (node)
     {
@@ -641,6 +654,7 @@ bool ecHtmlIndexer::DoIndexDocs(const wx
         count ++;
 
         ecIndexItem* item = (ecIndexItem*) node->Data();
+#endif
         wxString filename(item->m_urlToExamine);
         wxString urlFilename(item->m_urlToShow);
 
@@ -707,7 +721,11 @@ bool ecHtmlIndexer::DoIndexDocs(const wx
             }
         }
 
+#if wxCHECK_VERSION(2, 6, 0)
+        node = node->GetNext();
+#else
         node = node->Next();
+#endif
     }
     
 //    CreateHHCPackagesSection(wxT("Packages"), wxEmptyString, stream, docDir);
@@ -839,12 +857,21 @@ void ecHtmlIndexer::AddEndSection()
 
 void ecHtmlIndexer::ClearItems()
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode* node = m_indexItems.GetFirst();
+    while (node)
+    {
+        ecIndexItem* item = (ecIndexItem*) node->GetData();
+        delete item;
+        node = node->GetNext();
+#else
     wxNode* node = m_indexItems.First();
     while (node)
     {
         ecIndexItem* item = (ecIndexItem*) node->Data();
         delete item;
         node = node->Next();
+#endif
     }
     m_indexItems.Clear();
 }
--- a/host/tools/configtool/standalone/wxwin/ecscrolwin.cpp
+++ b/host/tools/configtool/standalone/wxwin/ecscrolwin.cpp
@@ -661,7 +661,11 @@ void ecScrolledWindow::OnChar(wxKeyEvent
     }
 
     int dsty;
+#if wxCHECK_VERSION(2, 6, 0)
+    switch ( event.GetKeyCode() )
+#else
     switch ( event.KeyCode() )
+#endif
     {
         case WXK_PAGEUP:
         case WXK_PRIOR:
--- a/host/tools/configtool/standalone/wxwin/ecscrolwin.h
+++ b/host/tools/configtool/standalone/wxwin/ecscrolwin.h
@@ -163,7 +163,12 @@ protected:
 
 private:
     DECLARE_EVENT_TABLE()
+
+#if wxCHECK_VERSION(2, 6, 0)
+    DECLARE_DYNAMIC_CLASS(ecScrolledWindow);
+#else
     DECLARE_ABSTRACT_CLASS(ecScrolledWindow)
+#endif
 	};
 
 #else
--- a/host/tools/configtool/standalone/wxwin/ecutils.cpp
+++ b/host/tools/configtool/standalone/wxwin/ecutils.cpp
@@ -612,10 +612,17 @@ bool wxStringToStringMap::Find(const wxS
 void wxStringToStringMap::Clear()
 {
     m_hashTable.BeginFind();
+#if wxCHECK_VERSION(2, 6, 0)
+    wxHashTable::Node* node;
+    while ((node = m_hashTable.Next()))
+    {
+        wxString* str = (wxString*) node->GetData();
+#else
     wxNode* node;
     while ((node = m_hashTable.Next()))
     {
         wxString* str = (wxString*) node->Data();
+#endif
         delete str;
     }
 }
@@ -627,10 +634,17 @@ void wxStringToStringMap::BeginFind()
 
 bool wxStringToStringMap::Next(wxString& key, wxString& value)
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    wxHashTable::Node* node = m_hashTable.Next();
+    if (node)
+    {
+        value = * (wxString*) node->GetData();
+#else
     wxNode* node = m_hashTable.Next();
     if (node)
     {
         value = * (wxString*) node->Data();
+#endif
         return TRUE;
     }
     else
@@ -804,6 +818,15 @@ int wxListCtrlFindColumn(wxListCtrl& lis
 // Utility function
 void wxRefreshControls(wxWindow* win)
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode *node = (wxNode *) win->GetChildren().GetFirst();
+    while (node)
+    {
+        wxWindow* win = (wxWindow*) node->GetData();
+        win->Refresh();
+        node = node->GetNext();
+    }
+#else
     wxNode *node = win->GetChildren().First();
     while (node)
     {
@@ -811,6 +834,7 @@ void wxRefreshControls(wxWindow* win)
         win->Refresh();
         node = node->Next();
     }
+#endif
 }
 
 wxOutputStream& operator <<(wxOutputStream& stream, const wxString& s)
@@ -861,6 +885,16 @@ void ecDialog::OnSize(wxSizeEvent& event
 
 wxWindowSettingsObject* wxWindowSettings::FindSettings(const wxString& windowName) const
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode* node = m_settings.GetFirst();
+    while (node)
+    {
+        wxWindowSettingsObject* obj = (wxWindowSettingsObject*) node->GetData();
+        if (obj->m_windowName.CmpNoCase(windowName) == 0)
+            return obj;
+        node = node->GetNext();
+    }
+#else
     wxNode* node = m_settings.First();
     while (node)
     {
@@ -869,12 +903,15 @@ wxWindowSettingsObject* wxWindowSettings
             return obj;
         node = node->Next();
     }
+#endif
+
     return NULL;
 }
 
 bool wxWindowSettings::LoadConfig(wxConfigBase& config)
 {
     unsigned int i = 0;
+
     for (i = 0; i < GetCount(); i++)
     {
         wxWindowSettingsObject* obj = GetNth(i);
--- a/host/tools/configtool/standalone/wxwin/ecutils.h
+++ b/host/tools/configtool/standalone/wxwin/ecutils.h
@@ -358,8 +358,14 @@ public:
     wxArrayPtrVoid* GetWindows(const wxString& name) const;
     void SetWindows(const wxString& name, wxArrayPtrVoid& arr);
 
+#if wxCHECK_VERSION(2, 6, 0)
+    int GetCount() const { return m_settings.GetCount(); }
+    wxWindowSettingsObject* GetNth(int i) const { return (wxWindowSettingsObject*) m_settings.Item(i)->GetData(); }
+#else
+	// Depreciated version
     int GetCount() const { return m_settings.Number(); }
     wxWindowSettingsObject* GetNth(int i) const { return (wxWindowSettingsObject*) m_settings.Nth(i)->Data(); }
+#endif
     wxString GetName(int i) const { return GetNth(i)->m_windowName; }
 
     void SetUseDefaults(bool useDefaults) { m_useDefaults = useDefaults; }
--- a/host/tools/configtool/standalone/wxwin/filename.cpp
+++ b/host/tools/configtool/standalone/wxwin/filename.cpp
@@ -371,7 +371,11 @@ bool ecFileName::Exists     () const
 
 bool ecFileName::IsDir      () const
 {
+#if wxCHECK_VERSION(2, 6, 0)
+	return (wxDirExists(* this));
+#else
     return wxPathExists(* this);
+#endif
 }
 
 bool ecFileName::IsFile     () const
@@ -410,7 +414,7 @@ bool ecFileName::SameFile(const ecFileNa
 #endif
 }
 
-ecFileName ecFileName::ExpandEnvironmentStrings(const wxChar* psz)
+ecFileName ecFileName::EC_ExpandEnvironmentStrings(const wxChar* psz)
 {
     // wxExpandEnvVars is from confbase.h
 
@@ -418,9 +422,9 @@ ecFileName ecFileName::ExpandEnvironment
     return f;
 }
 
-const ecFileName& ecFileName::ExpandEnvironmentStrings()
+const ecFileName& ecFileName::EC_ExpandEnvironmentStrings()
 {
-    *this=ecFileName::ExpandEnvironmentStrings(*this);
+    *this=ecFileName::EC_ExpandEnvironmentStrings(*this);
     return *this;
 }
 
@@ -463,7 +467,7 @@ const ecFileName& ecFileName::MakeRelati
 }
 
 
-ecFileName ecFileName::GetCurrentDirectory()
+ecFileName ecFileName::EC_GetCurrentDirectory()
 {
     ecFileName f;
     f = wxGetCwd();
@@ -525,7 +529,7 @@ const wxChar* *ecFileName::Chop()
 }
 #endif
 
-ecFileName ecFileName::GetTempPath()
+ecFileName ecFileName::EC_GetTempPath()
 {
     ecFileName f;
 #ifdef __WXMSW__
@@ -566,7 +570,7 @@ const ecFileName ecFileName::CygPath () 
     return rc;
 }
 
-bool ecFileName::CreateDirectory(bool bParentsToo,bool bFailIfAlreadyExists) const
+bool ecFileName::EC_CreateDirectory(bool bParentsToo,bool bFailIfAlreadyExists) const
 {
     if(bParentsToo)
     {
@@ -633,7 +637,7 @@ const wxString ecFileName::Root() const
     return wxPathOnly(*this);
 }
 
-ecFileName ecFileName::SetCurrentDirectory(const wxChar* pszDir)
+ecFileName ecFileName::EC_SetCurrentDirectory(const wxChar* pszDir)
 {
     const ecFileName strPwd=wxGetCwd();
     if (::wxSetWorkingDirectory(pszDir))
--- a/host/tools/configtool/standalone/wxwin/filename.h
+++ b/host/tools/configtool/standalone/wxwin/filename.h
@@ -62,10 +62,10 @@ public:
     void ReplaceExtension (const wxString& newExt);
     
     // previous directory is returned:
-    static ecFileName SetCurrentDirectory (const wxChar* pszDir);
+    static ecFileName EC_SetCurrentDirectory (const wxChar* pszDir);
     const wxString Root() const;
     const wxString Extension() const;
-    static ecFileName GetTempPath();
+    static ecFileName EC_GetTempPath();
     bool IsAbsolute() const;
     
     static const wxChar cSep;        // The path separator ('\' on windows)
@@ -126,9 +126,9 @@ public:
     const ecFileName Head() const;       // directory part
     const ecFileName CygPath() const;    // path mangled for CygWin
 
-    static ecFileName GetCurrentDirectory();
-    const ecFileName& ExpandEnvironmentStrings();
-    static ecFileName ExpandEnvironmentStrings(const wxChar* psz);
+    static ecFileName EC_GetCurrentDirectory();
+    const ecFileName& EC_ExpandEnvironmentStrings();
+    static ecFileName EC_ExpandEnvironmentStrings(const wxChar* psz);
 
     // Form path name relative to given parameter (if NULL, current directory)
     const ecFileName& MakeRelative(const wxChar* pszRelativeTo=0);
@@ -151,7 +151,7 @@ public:
     
     bool RecursivelyDelete(); 
     
-    bool CreateDirectory (bool bParentsToo=true,bool bFailIfAlreadyExists=false) const;
+    bool EC_CreateDirectory (bool bParentsToo = TRUE, bool bFailIfAlreadyExists = FALSE) const;
     
     static int FindFiles (const wxString& pszDir,wxArrayString &ar,const wxString& pszPattern=wxT("*.*"),bool bRecurse=TRUE,long dwExclude=wxDIR_DIRS|wxDIR_HIDDEN);
     
@@ -174,8 +174,8 @@ protected:
 class wxSaveExcursion {
     const ecFileName m_strPrevDir;
 public:
-    wxSaveExcursion(const wxChar* pszDir) : m_strPrevDir(ecFileName::SetCurrentDirectory(pszDir)) {}
-    ~wxSaveExcursion() { ecFileName::SetCurrentDirectory(m_strPrevDir); }
+    wxSaveExcursion(const wxChar* pszDir) : m_strPrevDir(ecFileName::EC_SetCurrentDirectory(pszDir)) {}
+    ~wxSaveExcursion() { ecFileName::EC_SetCurrentDirectory(m_strPrevDir); }
     bool Ok() const { return !m_strPrevDir.IsEmpty(); }
 };
 
--- a/host/tools/configtool/standalone/wxwin/folderdlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/folderdlg.cpp
@@ -100,7 +100,11 @@ void ecFolderDialog::OnInitDialog(wxInit
     if (comboBox->FindString(m_defaultPath) == -1)
         comboBox->Append(m_defaultPath);
 
+#if wxCHECK_VERSION(2, 6, 0)
+    if (comboBox->GetSelection() == -1)
+#else
     if (comboBox->GetSelection() == -1 && comboBox->Number() > 0)
+#endif
         comboBox->SetSelection(0);
 
     comboBox->SetFocus();
--- a/host/tools/configtool/standalone/wxwin/mainwin.cpp
+++ b/host/tools/configtool/standalone/wxwin/mainwin.cpp
@@ -565,18 +565,29 @@ void ecMainFrame::OnSize(wxSizeEvent& WX
     {
         double factorX = ((double) rect.GetWidth() / (double) wxGetApp().GetSettings().m_frameSize.GetWidth());
         double factorY = ((double) rect.GetHeight() / (double) wxGetApp().GetSettings().m_frameSize.GetHeight());
-        
+
+#if wxCHECK_VERSION(2, 6, 0)
+		wxNode* node = (wxNode *) GetChildren().GetFirst();
+        while (node)
+        {
+            wxWindow* win = (wxWindow*) node->GetData();
+#else
         wxNode* node = GetChildren().First();
         while (node)
         {
             wxWindow* win = (wxWindow*) node->Data();
+#endif
             if (win->IsKindOf(CLASSINFO(wxSashLayoutWindow)))
             {
                 wxSashLayoutWindow* sashWin = (wxSashLayoutWindow*) win;
                 wxSize sz = sashWin->GetSize();
                 sashWin->SetDefaultSize(wxSize((int) ((double) sz.x * factorX), (int) ((double) sz.y * factorY)));
             }
+#if wxCHECK_VERSION(2, 6, 0)
+            node = node->GetNext();
+#else
             node = node->Next();
+#endif
         }
     }
     
@@ -857,17 +868,28 @@ void ecMainFrame::OnSashDrag(wxSashEvent
     if (!layout.LayoutFrame(this))
     {
         // If layout failed, restored default sizes.
+#if wxCHECK_VERSION(2, 6, 0)
+        wxNode* node = (wxNode *) GetChildren().GetFirst();
+        while (node)
+        {
+            wxWindow* win = (wxWindow*) node->GetData();
+#else
         wxNode* node = GetChildren().First();
         while (node)
         {
             wxWindow* win = (wxWindow*) node->Data();
+#endif
             if (win->IsKindOf(CLASSINFO(wxSashLayoutWindow)))
             {
                 wxSashLayoutWindow* sashWin = (wxSashLayoutWindow*) win;
                 wxSize sz = sashWin->GetSize();
                 sashWin->SetDefaultSize(sz);
             }
+#if wxCHECK_VERSION(2, 6, 0)
+            node = node->GetNext();
+#else
             node = node->Next();
+#endif
         }
     }
     
@@ -875,8 +897,12 @@ void ecMainFrame::OnSashDrag(wxSashEvent
 
 void ecMainFrame::OnIdle(wxIdleEvent& event)
 {
+#if wxCHECK_VERSION(2, 6, 0)
+	// Doesn't event handlling happen anyway?
+#else
     // Normal idle processing
     wxFrame::OnIdle(event);
+#endif
 
     wxString text;
     if (GetStatusBar())
@@ -955,37 +981,63 @@ void ecMainFrame::GetMinorWindows(wxList
 // Get all visible sash windows
 void ecMainFrame::GetSashWindows(wxList& list)
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode* node = (wxNode *) GetChildren().GetFirst();
+    while (node)
+    {
+        wxWindow* win = (wxWindow*) node->GetData();
+#else
     wxNode* node = GetChildren().First();
     while (node)
     {
         wxWindow* win = (wxWindow*) node->Data();
+#endif
         if (win->IsKindOf(CLASSINFO(wxSashLayoutWindow)) && win->IsShown())
         {
             list.Append(win);
         }
+#if wxCHECK_VERSION(2, 6, 0)
+        node = node->GetNext();
+#else
         node = node->Next();
+#endif
     }
 }
 
 // Divide the given space evenly amongst some windows
 void ecMainFrame::DivideSpaceEvenly(wxList& list, const wxSize& space, int orient)
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    if (list.GetCount() == 0)
+#else
     if (list.Number() == 0)
+#endif
         return;
 
     // Find total size first
     int totalSize = 0;
     double proportion = 0.0;
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode* node = list.GetFirst();
+    while (node)
+    {
+        wxWindow* win = (wxWindow*) node->GetData();
+#else
     wxNode* node = list.First();
     while (node)
     {
         wxWindow* win = (wxWindow*) node->Data();
+#endif
         wxSize sz = win->GetSize();
         if (orient == wxHORIZONTAL)
             totalSize += sz.x;
         else
             totalSize += sz.y;
+#if wxCHECK_VERSION(2, 6, 0)
+        node = node->GetNext();
+#else
         node = node->Next();
+#endif
     }
     if (orient == wxHORIZONTAL)
     {
@@ -1001,30 +1053,53 @@ void ecMainFrame::DivideSpaceEvenly(wxLi
 
         proportion = ((double) space.y / (double) totalSize);
     }
+
+#if wxCHECK_VERSION(2, 6, 0)
+    node = list.GetFirst();
+    while (node)
+    {
+        wxWindow* win = (wxWindow*) node->GetData();
+#else
     node = list.First();
     while (node)
     {
         wxWindow* win = (wxWindow*) node->Data();
+#endif
         wxSize sz = win->GetSize();
         if (orient == wxHORIZONTAL)
             sz.x = (int) (sz.x * proportion);
         else
             sz.y = (int) (sz.y * proportion);
         win->SetSize(sz);
+#if wxCHECK_VERSION(2, 6, 0)
+        node = node->GetNext();
+#else
         node = node->Next();
+#endif
     }
 }
 
 // Restore the sash window default size from the actual window size
 void ecMainFrame::RestoreDefaultWindowSizes(wxList& list)
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode* node = list.GetFirst();
+    while (node)
+    {
+        wxSashLayoutWindow* sashWin = (wxSashLayoutWindow*) node->GetData();
+#else
     wxNode* node = list.First();
     while (node)
     {
         wxSashLayoutWindow* sashWin = (wxSashLayoutWindow*) node->Data();
+#endif
         wxSize sz = sashWin->GetSize();
         sashWin->SetDefaultSize(sz);
+#if wxCHECK_VERSION(2, 6, 0)
+        node = node->GetNext();
+#else
         node = node->Next();
+#endif
     }
 }
 
--- a/host/tools/configtool/standalone/wxwin/makefile.gnu
+++ b/host/tools/configtool/standalone/wxwin/makefile.gnu
@@ -26,14 +26,16 @@ EXTRALDFLAGS=-L$(TCLDIR)/lib -L$(INSTALL
 
 ifneq (,$(findstring CYGWIN, $(shell uname)))
   PROGRAM=configtool.exe
-  CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags` -D_WIN32 -D__WIN32__ -DSTRICT
+  CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags` -D_WIN32 -D__WIN32__ -DSTRICT -D__USE_W32_SOCKETS
   LDFLAGS=`$(WXDIR)/bin/wx-config --libs` -lshlwapi -Wl,--subsystem,windows
   EXTRAOBJECTS=$(CTBUILDDIR)/configtoolres.o
+  RCFLAGS=`$(WXDIR)/bin/wx-config --cppflags`
 else
   PROGRAM=configtool
   CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags`
   LDFLAGS=`$(WXDIR)/bin/wx-config --libs`
   EXTRAOBJECTS=
+  RCFLAGS=`$(WXDIR)/bin/wx-config --cppflags`
 endif
 
 ifeq "$(DEBUG)" ""
@@ -107,7 +109,7 @@ RESCOMP     = windres
 	$(CC) -o $@ $(OBJECTS) $(EXTRAOBJECTS) $(EXTRALDFLAGS) $(LDFLAGS)
 
 install: $(CTBUILDDIR)/$(PROGRAM)
-	install -s $< $(INSTALLDIR)/bin
+	install -D -s $< $(INSTALLDIR)/bin/$(PROGRAM)
 
 .cpp.o :
 	$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
@@ -116,7 +118,7 @@ install: $(CTBUILDDIR)/$(PROGRAM)
 	$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
 
 $(CTBUILDDIR)/configtoolres.o: $(CTDIR)/configtool.rc
-	$(RESCOMP) -i $< -o $@ --preprocessor "$(CC) -c -E -xc-header -DRC_INVOKED" --include-dir $(WXDIR)/include --include-dir $(CTDIR) --define __GNUWIN32__
+	$(RESCOMP) -i $< -o $@ --preprocessor "$(CC) -c -E -xc-header -DRC_INVOKED" $(RCFLAGS) --include-dir $(CTDIR) --define __GNUWIN32__
 
 clean:
 	rm -f $(CTBUILDDIR)/$(PROGRAM) $(CTBUILDDIR)/*.o
--- a/host/tools/configtool/standalone/wxwin/packagesdlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/packagesdlg.cpp
@@ -498,7 +498,11 @@ void ecPackagesDialog::Add(wxListBox* fr
         }
         
         // Now delete from one list and remove from t'other
+#if wxCHECK_VERSION(2, 6, 0)
+        for (i = 0; i < selectionsStrings.GetCount(); i++)
+#else
         for (i = 0; i < selectionsStrings.Number(); i++)
+#endif
         {
             wxString str = selectionsStrings[i];
             
--- a/host/tools/configtool/standalone/wxwin/packagesdlg.h
+++ b/host/tools/configtool/standalone/wxwin/packagesdlg.h
@@ -123,7 +123,11 @@ public:
 
 //// Accessors
     bool IsAdded(const wxString& str) ;
+#if wxCHECK_VERSION(2, 6, 0)
+    int GetCount() const { return m_items.GetCount(); }
+#else
     int GetCount() const { return m_items.Number(); }
+#endif
     wxString GetVersion (const wxString& item);
 
 protected:
--- a/host/tools/configtool/standalone/wxwin/platformsdlg.cpp
+++ b/host/tools/configtool/standalone/wxwin/platformsdlg.cpp
@@ -118,12 +118,21 @@ ecPlatformsDialog::~ecPlatformsDialog()
 
 void ecPlatformsDialog::Clear()
 {
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode* node = m_arTargetInfo.GetFirst();
+    while (node)
+    {
+        CeCosTestPlatform* platform = (CeCosTestPlatform*) node->GetData();
+        delete platform;
+        node = node->GetNext();
+#else
     wxNode* node = m_arTargetInfo.First();
     while (node)
     {
         CeCosTestPlatform* platform = (CeCosTestPlatform*) node->Data();
         delete platform;
         node = node->Next();
+#endif
     }
     m_arTargetInfo.Clear();
 }
@@ -283,7 +292,11 @@ void ecPlatformsDialog::OnDelete(wxComma
             {
                 delete Platform(sel);
                 m_listCtrl->DeleteItem(sel);
+#if wxCHECK_VERSION(2, 6, 0)
+                delete m_arTargetInfo.Item(sel);
+#else
                 delete m_arTargetInfo.Nth(sel);
+#endif
                 whereFrom = 0;
             }
         }
--- a/host/tools/configtool/standalone/wxwin/platformsdlg.h
+++ b/host/tools/configtool/standalone/wxwin/platformsdlg.h
@@ -107,7 +107,12 @@ public:
     void CreateControls(wxWindow* parent);
 
     CeCosTestPlatform *Platform (int i) { return (CeCosTestPlatform *) m_arTargetInfo[i]; }
+
+#if wxCHECK_VERSION(2, 6, 0)
+    unsigned int PlatformCount() const { return m_arTargetInfo.GetCount(); }
+#else
     unsigned int PlatformCount() const { return m_arTargetInfo.Number(); }
+#endif
     void Add(const CeCosTestPlatform &ti);   
     void Clear();
 
--- a/host/tools/configtool/standalone/wxwin/splittree.cpp
+++ b/host/tools/configtool/standalone/wxwin/splittree.cpp
@@ -205,7 +205,11 @@ void wxRemotelyScrolledTreeCtrl::ScrollT
     {
         UINT sbCode = SB_THUMBPOSITION;
         HWND vertScrollBar = 0;
+#if wxCHECK_VERSION(2, 6, 0)
+        MSWDefWindowProc((WXUINT) WM_VSCROLL, MAKELONG(sbCode, posVert), (WXLPARAM) vertScrollBar);
+#else
         MSWDefWindowProc((WXUINT) WM_VSCROLL, MAKELONG(sbCode, posVert), (WXHWND) vertScrollBar);
+#endif
     }
     else
 #endif
@@ -338,9 +342,17 @@ void wxRemotelyScrolledTreeCtrl::CalcTre
         rect = CombineRectangles(rect, itemSize);
     }
 
+#if wxCHECK_VERSION(2, 6, 0)
+    wxTreeItemIdValue cookie;
+    wxTreeItemId childId = GetFirstChild(id, cookie);
+
+    while (childId.IsOk())
+#else
     long cookie;
     wxTreeItemId childId = GetFirstChild(id, cookie);
+
     while (childId != 0)
+#endif
     {
         CalcTreeSize(childId, rect);
         childId = GetNextChild(childId, cookie);
@@ -426,11 +438,19 @@ void wxTreeCompanionWindow::OnPaint(wxPa
     
     if (!m_treeCtrl)
         return;
-    
+
+#if wxCHECK_VERSION(2, 6, 0)
+    wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+    dc.SetPen(pen);
+    dc.SetBrush(* wxTRANSPARENT_BRUSH);
+    wxFont font(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
+#else
     wxPen pen(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
     dc.SetPen(pen);
     dc.SetBrush(* wxTRANSPARENT_BRUSH);
     wxFont font(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+#endif
+
     dc.SetFont(font);
     
     wxSize clientSize = GetClientSize();
@@ -529,8 +549,15 @@ void wxThinSplitterWindow::DrawSash(wxDC
     
     if ( m_splitMode == wxSPLIT_VERTICAL )
     {
+#if wxCHECK_VERSION(2, 6, 0)
+		// The variables below don't seem to exist....
+		wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+		dc.SetPen(pen);
+		dc.SetBrush(* wxTRANSPARENT_BRUSH);
+#else
         dc.SetPen(* m_facePen);
         dc.SetBrush(* m_faceBrush);
+#endif
         int h1 = h-1;
         int y1 = 0;
         if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER && (GetWindowStyleFlag() & wxSP_3DBORDER) != wxSP_3DBORDER )
@@ -543,8 +570,15 @@ void wxThinSplitterWindow::DrawSash(wxDC
     }
     else
     {
+#if wxCHECK_VERSION(2, 6, 0)
+		// The variables below don't seem to exist....
+		wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+		dc.SetPen(pen);
+		dc.SetBrush(* wxTRANSPARENT_BRUSH);
+#else
         dc.SetPen(* m_facePen);
         dc.SetBrush(* m_faceBrush);
+#endif
         int w1 = w-1;
         int x1 = 0;
         if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER && (GetWindowStyleFlag() & wxSP_3DBORDER) != wxSP_3DBORDER )
@@ -587,9 +621,15 @@ wxSplitterScrolledWindow::wxSplitterScro
 void wxSplitterScrolledWindow::OnSize(wxSizeEvent& event)
 {
     wxSize sz = GetClientSize();
+#if wxCHECK_VERSION(2, 6, 0)
+    if (GetChildren().GetFirst())
+    {
+        ((wxWindow*) GetChildren().GetFirst()->GetData())->SetSize(0, 0, sz.x, sz.y);
+#else
     if (GetChildren().First())
     {
         ((wxWindow*) GetChildren().First()->Data())->SetSize(0, 0, sz.x, sz.y);
+#endif
     }
 }
 
@@ -640,10 +680,18 @@ void wxSplitterScrolledWindow::OnScroll(
     }
     
     // Find targets in splitter window and send the event to them
+
+#if wxCHECK_VERSION(2, 6, 0)
+    wxNode* node = (wxNode *) GetChildren().GetFirst();
+    while (node)
+    {
+        wxWindow* child = (wxWindow*) node->GetData();
+#else
     wxNode* node = GetChildren().First();
     while (node)
     {
         wxWindow* child = (wxWindow*) node->Data();
+#endif
         if (child->IsKindOf(CLASSINFO(wxSplitterWindow)))
         {
             wxSplitterWindow* splitter = (wxSplitterWindow*) child;
@@ -653,7 +701,11 @@ void wxSplitterScrolledWindow::OnScroll(
                 splitter->GetWindow2()->ProcessEvent(event);
             break;
         }
+#if wxCHECK_VERSION(2, 6, 0)
+        node = node->GetNext();
+#else
         node = node->Next();
+#endif
     }
     
 #ifdef __WXMAC__