Mercurial > ecos
diff host/tools/configtool/standalone/wxwin/ecutils.cpp @ 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 | d7c9117adc25 |
| children | 24c0267fbb70 |
line wrap: on
line diff
--- 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);
