From f8105809ef8f7cb0d1a9933f3f790b7b446c7cfa Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 13 Jun 2003 12:20:33 +0000 Subject: [PATCH] Some fixes for gcc compilation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/configtool/src/Makefile | 8 +++++--- utils/configtool/src/appsettings.cpp | 2 +- utils/configtool/src/appsettings.h | 2 +- utils/configtool/src/configitem.cpp | 2 +- utils/configtool/src/configitemselector.cpp | 2 +- utils/configtool/src/configitemselector.h | 2 +- utils/configtool/src/configtooldoc.cpp | 4 ++-- utils/configtool/src/configtoolview.cpp | 5 +++-- utils/configtool/src/configtree.cpp | 2 -- utils/configtool/src/custompropertydialog.cpp | 2 +- utils/configtool/src/custompropertydialog.h | 2 +- utils/configtool/src/htmlparser.h | 2 +- utils/configtool/src/mainframe.cpp | 6 +++++- utils/configtool/src/mainframe.h | 4 ++++ utils/configtool/src/property.cpp | 4 ++-- utils/configtool/src/settingsdialog.cpp | 4 ++++ utils/configtool/src/settingsdialog.h | 4 ++++ utils/configtool/src/utils.cpp | 8 ++++---- utils/configtool/src/wxconfigtool.cpp | 2 +- utils/configtool/src/wxconfigtool.h | 2 +- utils/configtool/src/wxconfigtool.rc | 3 +++ 21 files changed, 46 insertions(+), 26 deletions(-) diff --git a/utils/configtool/src/Makefile b/utils/configtool/src/Makefile index d8103b5e4c..db71345293 100644 --- a/utils/configtool/src/Makefile +++ b/utils/configtool/src/Makefile @@ -63,10 +63,12 @@ APPEXTRADEFS= \ # -I$(UTILSDIR) \ -WXVERSION=2.4 +WXVERSION=2.5 # Use the small C++ support library -APPEXTRALIBS=-lsupc++ ${top_builddir}/lib/libwx_$(WXTOOLKIT)$(WXDEBUGSUFFIX)_xrc-$(WXVERSION).a +APPEXTRALIBS=-lsupc++ + +# ${top_builddir}/lib/libwx_$(WXTOOLKIT)$(WXDEBUGSUFFIX)_xrc-$(WXVERSION).a PLATFORM_OS=$(shell echo $(OS)) @@ -211,7 +213,7 @@ $(APPBUILDDIR)/property.o: $(APPSRCDIR)/property.cpp $(APPINCDIR)/property.h $(A $(APPBUILDDIR)/settingsdialog.o: $(APPSRCDIR)/settingsdialog.cpp $(APPINCDIR)/settingsdialog.h $(APPSRCDIR)/symbols.h $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< -$(APPBUILDDIR)/utils.o: $(APPSRCDIR)/utils.cpp $(APPINCDIR)/imagewindow.h $(APPSRCDIR)/symbols.h +$(APPBUILDDIR)/utils.o: $(APPSRCDIR)/utils.cpp $(APPINCDIR)/utils.h $(APPSRCDIR)/symbols.h $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< $(APPBUILDDIR)/wxconfigtool_resources.o: $(APPSRCDIR)/wxconfigtool.rc diff --git a/utils/configtool/src/appsettings.cpp b/utils/configtool/src/appsettings.cpp index 69fd5a3d52..41cbfccc05 100644 --- a/utils/configtool/src/appsettings.cpp +++ b/utils/configtool/src/appsettings.cpp @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -#pragma implementation appsettings.h +#pragma implementation "appsettings.h" #endif #include "wx/wx.h" diff --git a/utils/configtool/src/appsettings.h b/utils/configtool/src/appsettings.h index 8a529fc82a..ac218f6d21 100644 --- a/utils/configtool/src/appsettings.h +++ b/utils/configtool/src/appsettings.h @@ -13,7 +13,7 @@ #define _AP_APPSETTINGS_H_ #ifdef __GNUG__ -#pragma interface appsettings.cpp +#pragma interface "appsettings.cpp" #endif #include "wx/notebook.h" diff --git a/utils/configtool/src/configitem.cpp b/utils/configtool/src/configitem.cpp index 2db7ac8e7a..ca5c268270 100644 --- a/utils/configtool/src/configitem.cpp +++ b/utils/configtool/src/configitem.cpp @@ -128,7 +128,7 @@ ctConfigItem* ctConfigItem::GetChild(int n) const if ( n < GetChildCount() && n > -1 ) { - ctConfigItem* child = wxDynamicCast(m_children.Nth(n)->Data(), ctConfigItem); + ctConfigItem* child = wxDynamicCast(m_children.Item(n)->GetData(), ctConfigItem); return child; } else diff --git a/utils/configtool/src/configitemselector.cpp b/utils/configtool/src/configitemselector.cpp index 35b6ae10bc..c6f96d442a 100644 --- a/utils/configtool/src/configitemselector.cpp +++ b/utils/configtool/src/configitemselector.cpp @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -#pragma implementation configitemselector.cpp +#pragma implementation "configitemselector.h" #endif #include diff --git a/utils/configtool/src/configitemselector.h b/utils/configtool/src/configitemselector.h index 7b705736ae..7946d034ff 100644 --- a/utils/configtool/src/configitemselector.h +++ b/utils/configtool/src/configitemselector.h @@ -13,7 +13,7 @@ #define _CONFIGITEMSELECTOR_H_ #ifdef __GNUG__ -#pragma interface configitemselector.h +#pragma interface "configitemselector.cpp" #endif /*! diff --git a/utils/configtool/src/configtooldoc.cpp b/utils/configtool/src/configtooldoc.cpp index d5ae2a8b24..5dd41d2461 100644 --- a/utils/configtool/src/configtooldoc.cpp +++ b/utils/configtool/src/configtooldoc.cpp @@ -352,7 +352,7 @@ bool ctConfigToolDoc::DoSave(ctConfigItem* item, wxOutputStream& stream, int ind stream << ctEscapeHTMLCharacters(prop->GetVariant().GetString()) ; stream << wxT("GetName() << wxT(">"); - node = node->Next(); + node = node->GetNext(); } // Output children @@ -362,7 +362,7 @@ bool ctConfigToolDoc::DoSave(ctConfigItem* item, wxOutputStream& stream, int ind ctConfigItem* child = (ctConfigItem*) node->GetData(); DoSave(child, stream, indent); - node = node->Next(); + node = node->GetNext(); } indent --; diff --git a/utils/configtool/src/configtoolview.cpp b/utils/configtool/src/configtoolview.cpp index 10cb368559..c9549799ab 100644 --- a/utils/configtool/src/configtoolview.cpp +++ b/utils/configtool/src/configtoolview.cpp @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ - #pragma implementation "configtoolview.cpp" + #pragma implementation "configtoolview.h" #endif // Includes other headers for precompiled compilation @@ -448,8 +448,9 @@ void ctConfigToolView::OnDeleteItem(wxCommandEvent& event) ctConfigItem* sel = GetSelection(); if (sel) { + wxString name(sel->GetName()); wxString msg; - msg.Printf(_("Delete %s?"), sel->GetName()); + msg.Printf(_("Delete %s?"), (const wxChar*) name); if (wxYES == wxMessageBox(msg, _("Delete item"), wxICON_QUESTION|wxYES_NO)) { wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->Delete(sel->GetTreeItemId()); diff --git a/utils/configtool/src/configtree.cpp b/utils/configtool/src/configtree.cpp index 3da10101fb..40d70f9c90 100644 --- a/utils/configtool/src/configtree.cpp +++ b/utils/configtool/src/configtree.cpp @@ -24,8 +24,6 @@ #include "wx/cshelp.h" // Include XPM icons -#include "bitmaps/folder1.xpm" - #include "bitmaps/closedfolder.xpm" #include "bitmaps/closedfolder_dis.xpm" diff --git a/utils/configtool/src/custompropertydialog.cpp b/utils/configtool/src/custompropertydialog.cpp index ef631a4474..9bf09e750a 100644 --- a/utils/configtool/src/custompropertydialog.cpp +++ b/utils/configtool/src/custompropertydialog.cpp @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -#pragma implementation custompropertydialog.h +#pragma implementation "custompropertydialog.h" #endif #include diff --git a/utils/configtool/src/custompropertydialog.h b/utils/configtool/src/custompropertydialog.h index ffaff8f859..28488de734 100644 --- a/utils/configtool/src/custompropertydialog.h +++ b/utils/configtool/src/custompropertydialog.h @@ -13,7 +13,7 @@ #define _CUSTOMPROPERTYDIALOG_H_ #ifdef __GNUG__ -#pragma interface custompropertydialog.cpp +#pragma interface "custompropertydialog.cpp" #endif /*! diff --git a/utils/configtool/src/htmlparser.h b/utils/configtool/src/htmlparser.h index b03e23c0fb..3c539914d1 100644 --- a/utils/configtool/src/htmlparser.h +++ b/utils/configtool/src/htmlparser.h @@ -13,7 +13,7 @@ #define _HTMLPARSER_H_ #ifdef __GNUG__ - #pragma interface "htmlparser.h" + #pragma interface "htmlparser.cpp" #endif //#include "wx/module.h" diff --git a/utils/configtool/src/mainframe.cpp b/utils/configtool/src/mainframe.cpp index 5e967a3976..e0d9d79788 100644 --- a/utils/configtool/src/mainframe.cpp +++ b/utils/configtool/src/mainframe.cpp @@ -9,6 +9,10 @@ // Licence: ///////////////////////////////////////////////////////////////////////////// +#ifdef __GNUG__ +#pragma implementation "mainframe.h" +#endif + #include "wx/wx.h" #ifdef __BORLANDC__ @@ -209,7 +213,7 @@ void ctMainFrame::InitToolBar(wxToolBar* toolBar) toolBarBitmaps[3] = wxBitmap(copy_xpm); toolBarBitmaps[4] = wxBitmap(cut_xpm); toolBarBitmaps[5] = wxBitmap(paste_xpm); - toolBarBitmaps[6] = wxBitmap(print_xpm); +// toolBarBitmaps[6] = wxBitmap(print_xpm); toolBarBitmaps[7] = wxBitmap(help_xpm); toolBarBitmaps[10] = wxBitmap(undo_xpm); toolBarBitmaps[11] = wxBitmap(redo_xpm); diff --git a/utils/configtool/src/mainframe.h b/utils/configtool/src/mainframe.h index 1e53bbc25e..d8c9460753 100644 --- a/utils/configtool/src/mainframe.h +++ b/utils/configtool/src/mainframe.h @@ -12,6 +12,10 @@ #ifndef _AP_MAINFRAME_H_ #define _AP_MAINFRAME_H_ +#ifdef __GNUG__ +#pragma interface "mainframe.cpp" +#endif + #include "wx/imaglist.h" #include "wx/docview.h" diff --git a/utils/configtool/src/property.cpp b/utils/configtool/src/property.cpp index edaf2e31ec..fa09d72870 100644 --- a/utils/configtool/src/property.cpp +++ b/utils/configtool/src/property.cpp @@ -158,7 +158,7 @@ ctProperty* ctProperties::GetNth(int i) const wxASSERT( i < (int) GetCount() ); if (i < (int) GetCount()) { - wxNode* node = m_list.Nth(i); + wxNode* node = m_list.Item(i); return (ctProperty*) node->GetData(); } return NULL; @@ -229,4 +229,4 @@ void ctProperties::RemoveHiddenProperties() node = next; } } -#endif \ No newline at end of file +#endif diff --git a/utils/configtool/src/settingsdialog.cpp b/utils/configtool/src/settingsdialog.cpp index fc0239fd7a..7bcb2fb022 100644 --- a/utils/configtool/src/settingsdialog.cpp +++ b/utils/configtool/src/settingsdialog.cpp @@ -9,6 +9,10 @@ // Licence: ///////////////////////////////////////////////////////////////////////////// +#ifdef __GNUG__ +#pragma implementation "settingsdialog.h" +#endif + #include "wx/wx.h" #include "wx/cshelp.h" #include "wx/statline.h" diff --git a/utils/configtool/src/settingsdialog.h b/utils/configtool/src/settingsdialog.h index 2efcd63667..bee8b64381 100644 --- a/utils/configtool/src/settingsdialog.h +++ b/utils/configtool/src/settingsdialog.h @@ -12,6 +12,10 @@ #ifndef _SETTINGSDIALOG_H_ #define _SETTINGSDIALOG_H_ +#ifdef __GNUG__ +#pragma interface "settingsdialog.cpp" +#endif + /*! * Includes */ diff --git a/utils/configtool/src/utils.cpp b/utils/configtool/src/utils.cpp index d1bdefb514..2be69b4ab8 100644 --- a/utils/configtool/src/utils.cpp +++ b/utils/configtool/src/utils.cpp @@ -405,13 +405,13 @@ bool wxIconTable::AddInfo(const wxString& name, const wxIcon& icon, int state, b wxIconInfo* wxIconTable::FindInfo(const wxString& name) const { - wxNode* node = First(); + wxNode* node = GetFirst(); while (node) { - wxIconInfo* info = (wxIconInfo*) node->Data(); + wxIconInfo* info = (wxIconInfo*) node->GetData(); if (info->GetName() == name) return info; - node = node->Next(); + node = node->GetNext(); } return NULL; } @@ -474,4 +474,4 @@ wxString ctEscapeHTMLCharacters(const wxString& str) s += c; } return s; -} \ No newline at end of file +} diff --git a/utils/configtool/src/wxconfigtool.cpp b/utils/configtool/src/wxconfigtool.cpp index f667b1b632..17fbe701db 100644 --- a/utils/configtool/src/wxconfigtool.cpp +++ b/utils/configtool/src/wxconfigtool.cpp @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -#pragma implementation wxconfigtool.h +#pragma implementation "wxconfigtool.h" #endif #include "wx/wx.h" diff --git a/utils/configtool/src/wxconfigtool.h b/utils/configtool/src/wxconfigtool.h index a38fca2140..72ed69e763 100644 --- a/utils/configtool/src/wxconfigtool.h +++ b/utils/configtool/src/wxconfigtool.h @@ -13,7 +13,7 @@ #define _AP_WXCONFIGTOOL_H_ #ifdef __GNUG__ -#pragma interface wxconfigtool.cpp +#pragma interface "wxconfigtool.cpp" #endif #include "wx/docview.h" diff --git a/utils/configtool/src/wxconfigtool.rc b/utils/configtool/src/wxconfigtool.rc index a885666454..27e1424eb5 100644 --- a/utils/configtool/src/wxconfigtool.rc +++ b/utils/configtool/src/wxconfigtool.rc @@ -4,5 +4,8 @@ wxconfigtool ICON "bitmaps/wxconfigtool.ico" #include "wx/msw/wx.rc" +/* Use if compiling with earlier versions of wxWindows */ +#if 0 1 24 "wxconfigtool.exe.manifest" +#endif -- 2.45.2