From: Julian Smart Date: Thu, 11 Sep 2003 09:29:25 +0000 (+0000) Subject: Applied patch [ 796736 ] unicode and various warnings fixes for configtool util X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/69da0d99464a82aae30dcb704c98bc9b4e7b095b Applied patch [ 796736 ] unicode and various warnings fixes for configtool util git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/configtool/src/appsettings.cpp b/utils/configtool/src/appsettings.cpp index 1f0bf6cf64..ef7e249798 100644 --- a/utils/configtool/src/appsettings.cpp +++ b/utils/configtool/src/appsettings.cpp @@ -152,7 +152,7 @@ wxString ctSettings::GenerateFilename(const wxString& rootName) while (wxFileExists(fullFilename)) { i ++; - postfixStr.Printf("%d", i); + postfixStr.Printf(_T("%d"), i); fullFilename = filename + postfixStr + wxT(".wxs"); } @@ -273,7 +273,7 @@ bool ctSettings::SaveConfig() return TRUE; } -void ctSettings::ShowSettingsDialog(const wxString& page) +void ctSettings::ShowSettingsDialog(const wxString& WXUNUSED(page)) { ctSettingsDialog* dialog = new ctSettingsDialog(wxGetApp().GetTopWindow()); // if (!page.IsEmpty()) diff --git a/utils/configtool/src/configitem.cpp b/utils/configtool/src/configitem.cpp index 01e8c4d1cb..1add25620a 100644 --- a/utils/configtool/src/configitem.cpp +++ b/utils/configtool/src/configitem.cpp @@ -261,7 +261,7 @@ void ctConfigItem::InitProperties() /// Do additional actions to apply the property to the internal /// representation. -void ctConfigItem::ApplyProperty(ctProperty* prop, const wxVariant& oldValue) +void ctConfigItem::ApplyProperty(ctProperty* prop, const wxVariant& WXUNUSED(oldValue)) { ctConfigToolDoc* doc = GetDocument(); bool oldModified = doc->IsModified(); diff --git a/utils/configtool/src/configitemselector.cpp b/utils/configtool/src/configitemselector.cpp index c6f96d442a..4a08a3efca 100644 --- a/utils/configtool/src/configitemselector.cpp +++ b/utils/configtool/src/configitemselector.cpp @@ -137,7 +137,7 @@ void ctConfigItemsSelector::CreateControls() * Event handler for ID_CONFIG_ADD */ -void ctConfigItemsSelector::OnConfigAdd( wxCommandEvent& event ) +void ctConfigItemsSelector::OnConfigAdd( wxCommandEvent& WXUNUSED(event) ) { wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox); wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox); @@ -159,7 +159,7 @@ void ctConfigItemsSelector::OnConfigAdd( wxCommandEvent& event ) * Event handler for ID_CONFIG_REMOVE */ -void ctConfigItemsSelector::OnConfigRemove( wxCommandEvent& event ) +void ctConfigItemsSelector::OnConfigRemove( wxCommandEvent& WXUNUSED(event) ) { wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox); if (listBox) diff --git a/utils/configtool/src/configtoolview.cpp b/utils/configtool/src/configtoolview.cpp index 138fc3eac5..d0e585c4a5 100644 --- a/utils/configtool/src/configtoolview.cpp +++ b/utils/configtool/src/configtoolview.cpp @@ -112,7 +112,7 @@ bool ctConfigToolView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) return TRUE; } -void ctConfigToolView::OnDraw(wxDC *dc) +void ctConfigToolView::OnDraw(wxDC *WXUNUSED(dc)) { } @@ -190,7 +190,7 @@ void ctConfigToolView::OnUpdate(wxView *WXUNUSED(sender), wxObject *hintObj) } // Clean up windows used for displaying the view. -bool ctConfigToolView::OnClose(bool deleteWindow) +bool ctConfigToolView::OnClose(bool WXUNUSED(deleteWindow)) { if (!GetDocument()->Close()) return FALSE; @@ -387,37 +387,37 @@ ctConfigItem* ctConfigToolView::GetSelection() } /// Add a checkbox item -void ctConfigToolView::OnAddCheckBoxItem(wxCommandEvent& event) +void ctConfigToolView::OnAddCheckBoxItem(wxCommandEvent& WXUNUSED(event)) { AddItem(ctTypeBoolCheck, _("New checkbox item")); } /// Add a radiobutton item -void ctConfigToolView::OnAddRadioButtonItem(wxCommandEvent& event) +void ctConfigToolView::OnAddRadioButtonItem(wxCommandEvent& WXUNUSED(event)) { AddItem(ctTypeBoolRadio, _("New radio button item")); } /// Add a group item -void ctConfigToolView::OnAddGroupItem(wxCommandEvent& event) +void ctConfigToolView::OnAddGroupItem(wxCommandEvent& WXUNUSED(event)) { AddItem(ctTypeGroup, _("New group item")); } /// Add a group option item -void ctConfigToolView::OnAddCheckGroupItem(wxCommandEvent& event) +void ctConfigToolView::OnAddCheckGroupItem(wxCommandEvent& WXUNUSED(event)) { AddItem(ctTypeCheckGroup, _("New check group item")); } /// Add a group option item -void ctConfigToolView::OnAddRadioGroupItem(wxCommandEvent& event) +void ctConfigToolView::OnAddRadioGroupItem(wxCommandEvent& WXUNUSED(event)) { AddItem(ctTypeRadioGroup, _("New radio group item")); } /// Add a string item -void ctConfigToolView::OnAddStringItem(wxCommandEvent& event) +void ctConfigToolView::OnAddStringItem(wxCommandEvent& WXUNUSED(event)) { AddItem(ctTypeString, _("New string item")); } @@ -456,7 +456,7 @@ void ctConfigToolView::AddItem(ctConfigType type, const wxString& msg) } /// Delete an item -void ctConfigToolView::OnDeleteItem(wxCommandEvent& event) +void ctConfigToolView::OnDeleteItem(wxCommandEvent& WXUNUSED(event)) { ctConfigItem* sel = GetSelection(); if (sel) @@ -472,7 +472,7 @@ void ctConfigToolView::OnDeleteItem(wxCommandEvent& event) } /// Rename an item -void ctConfigToolView::OnRenameItem(wxCommandEvent& event) +void ctConfigToolView::OnRenameItem(wxCommandEvent& WXUNUSED(event)) { ctConfigItem* sel = GetSelection(); if (sel) @@ -491,7 +491,7 @@ void ctConfigToolView::OnRenameItem(wxCommandEvent& event) } /// Copy an item to the clipboard -void ctConfigToolView::OnCopy(wxCommandEvent& event) +void ctConfigToolView::OnCopy(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = GetSelection(); @@ -502,7 +502,7 @@ void ctConfigToolView::OnCopy(wxCommandEvent& event) } /// Copy an item to the clipboard and cut the item -void ctConfigToolView::OnCut(wxCommandEvent& event) +void ctConfigToolView::OnCut(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = GetSelection(); @@ -517,7 +517,7 @@ void ctConfigToolView::OnCut(wxCommandEvent& event) } /// Paste an item from the clipboard to the tree -void ctConfigToolView::OnPaste(wxCommandEvent& event) +void ctConfigToolView::OnPaste(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = GetSelection(); @@ -565,7 +565,7 @@ void ctConfigToolView::OnUpdatePaste(wxUpdateUIEvent& event) } /// Copy an item to the clipboard -void ctConfigToolView::OnContextCopy(wxCommandEvent& event) +void ctConfigToolView::OnContextCopy(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem(); @@ -576,7 +576,7 @@ void ctConfigToolView::OnContextCopy(wxCommandEvent& event) } /// Copy an item to the clipboard and cut the item -void ctConfigToolView::OnContextCut(wxCommandEvent& event) +void ctConfigToolView::OnContextCut(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem(); @@ -591,7 +591,7 @@ void ctConfigToolView::OnContextCut(wxCommandEvent& event) } /// Paste an item from the clipboard to the tree -void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& event) +void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem(); @@ -608,7 +608,7 @@ void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& event) } /// Paste an item from the clipboard to the tree -void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& event) +void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem(); @@ -625,7 +625,7 @@ void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& event) } /// Paste an item from the clipboard to the tree -void ctConfigToolView::OnContextPasteAsChild(wxCommandEvent& event) +void ctConfigToolView::OnContextPasteAsChild(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem(); @@ -685,7 +685,7 @@ void ctConfigToolView::OnUpdateContextPasteAsChild(wxUpdateUIEvent& event) } /// Item help -void ctConfigToolView::OnItemHelp(wxCommandEvent& event) +void ctConfigToolView::OnItemHelp(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); if ( doc && GetSelection() ) @@ -706,7 +706,7 @@ void ctConfigToolView::OnUpdateItemHelp(wxUpdateUIEvent& event) } /// Add a custom property -void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& event) +void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = GetSelection(); @@ -751,7 +751,7 @@ void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& event) } /// Edit a custom property -void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event) +void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = GetSelection(); @@ -823,7 +823,7 @@ void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event) } /// Delete a custom property -void ctConfigToolView::OnDeleteCustomProperty(wxCommandEvent& event) +void ctConfigToolView::OnDeleteCustomProperty(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); ctConfigItem* sel = GetSelection(); @@ -908,7 +908,7 @@ void ctConfigToolView::OnTabSelect(wxNotebookEvent& event) } } -void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& event) +void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); wxString setupStr = doc->GenerateSetup(); @@ -940,7 +940,7 @@ void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& event) } } -void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& event) +void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); wxString configureStr = doc->GenerateConfigureCommand(); @@ -983,7 +983,7 @@ void ctConfigToolView::OnUpdateSaveConfigureCommand(wxUpdateUIEvent& event) } /// Find text -void ctConfigToolView::OnFind(wxCommandEvent& event) +void ctConfigToolView::OnFind(wxCommandEvent& WXUNUSED(event)) { ctFindReplaceDialog* dialog = wxGetApp().GetMainFrame()->GetFindDialog(); if (dialog) @@ -1015,7 +1015,7 @@ void ctConfigToolView::OnUpdateFind(wxUpdateUIEvent& event) } /// Save default file type -void ctConfigToolView::OnGo(wxCommandEvent& event) +void ctConfigToolView::OnGo(wxCommandEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument(); wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir; diff --git a/utils/configtool/src/configtree.cpp b/utils/configtool/src/configtree.cpp index 40d70f9c90..3f30098263 100644 --- a/utils/configtool/src/configtree.cpp +++ b/utils/configtool/src/configtree.cpp @@ -92,28 +92,28 @@ void ctConfigTreeCtrl::LoadIcons() m_iconTable.SetImageList(m_imageList); SetImageList(m_imageList); - m_iconTable.AddInfo("Group", wxIcon(closedfolder_xpm), 0, TRUE); - m_iconTable.AddInfo("Group", wxIcon(closedfolder_dis_xpm), 0, FALSE); + m_iconTable.AddInfo(_T("Group"), wxIcon(closedfolder_xpm), 0, TRUE); + m_iconTable.AddInfo(_T("Group"), wxIcon(closedfolder_dis_xpm), 0, FALSE); - m_iconTable.AddInfo("Checkbox", wxIcon(checked_xpm), 0, TRUE); - m_iconTable.AddInfo("Checkbox", wxIcon(checked_dis_xpm), 0, FALSE); - m_iconTable.AddInfo("Checkbox", wxIcon(unchecked_xpm), 1, TRUE); - m_iconTable.AddInfo("Checkbox", wxIcon(unchecked_dis_xpm), 1, FALSE); + m_iconTable.AddInfo(_T("Checkbox"), wxIcon(checked_xpm), 0, TRUE); + m_iconTable.AddInfo(_T("Checkbox"), wxIcon(checked_dis_xpm), 0, FALSE); + m_iconTable.AddInfo(_T("Checkbox"), wxIcon(unchecked_xpm), 1, TRUE); + m_iconTable.AddInfo(_T("Checkbox"), wxIcon(unchecked_dis_xpm), 1, FALSE); - m_iconTable.AddInfo("CheckGroup", wxIcon(checkedfolder_xpm), 0, TRUE); - m_iconTable.AddInfo("CheckGroup", wxIcon(checkedfolder_dis_xpm), 0, FALSE); - m_iconTable.AddInfo("CheckGroup", wxIcon(uncheckedfolder_xpm), 1, TRUE); - m_iconTable.AddInfo("CheckGroup", wxIcon(uncheckedfolder_dis_xpm), 1, FALSE); + m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(checkedfolder_xpm), 0, TRUE); + m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(checkedfolder_dis_xpm), 0, FALSE); + m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(uncheckedfolder_xpm), 1, TRUE); + m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(uncheckedfolder_dis_xpm), 1, FALSE); - m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderon_xpm), 0, TRUE); - m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderon_dis_xpm), 0, FALSE); - m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderoff_xpm), 1, TRUE); - m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderoff_dis_xpm), 1, FALSE); + m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderon_xpm), 0, TRUE); + m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderon_dis_xpm), 0, FALSE); + m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderoff_xpm), 1, TRUE); + m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderoff_dis_xpm), 1, FALSE); - m_iconTable.AddInfo("Radiobutton", wxIcon(radioon_xpm), 0, TRUE); - m_iconTable.AddInfo("Radiobutton", wxIcon(radioon_dis_xpm), 0, FALSE); - m_iconTable.AddInfo("Radiobutton", wxIcon(radiooff_xpm), 1, TRUE); - m_iconTable.AddInfo("Radiobutton", wxIcon(radiooff_dis_xpm), 1, FALSE); + m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radioon_xpm), 0, TRUE); + m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radioon_dis_xpm), 0, FALSE); + m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radiooff_xpm), 1, TRUE); + m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radiooff_dis_xpm), 1, FALSE); } ctConfigTreeCtrl::~ctConfigTreeCtrl() @@ -124,7 +124,7 @@ ctConfigTreeCtrl::~ctConfigTreeCtrl() delete m_contextMenu; } -void ctConfigTreeCtrl::OnSelChanged(wxTreeEvent& event) +void ctConfigTreeCtrl::OnSelChanged(wxTreeEvent& WXUNUSED(event)) { ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument(); if (doc) diff --git a/utils/configtool/src/custompropertydialog.cpp b/utils/configtool/src/custompropertydialog.cpp index 354956b4be..4d6103c8a4 100644 --- a/utils/configtool/src/custompropertydialog.cpp +++ b/utils/configtool/src/custompropertydialog.cpp @@ -200,7 +200,7 @@ void ctCustomPropertyDialog::OnUpdatePropertyChoices( wxUpdateUIEvent& event ) * Event handler for ID_PROPERTY_CHOICE_ADD */ -void ctCustomPropertyDialog::OnPropertyChoiceAdd( wxCommandEvent& event ) +void ctCustomPropertyDialog::OnPropertyChoiceAdd( wxCommandEvent& WXUNUSED(event) ) { wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYTYPE); if ( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") ) @@ -229,9 +229,9 @@ void ctCustomPropertyDialog::OnUpdatePropertyChoiceAdd( wxUpdateUIEvent& event ) * Event handler for ID_PROPERTY_CHOICE_REMOVE */ -void ctCustomPropertyDialog::OnPropertyChoiceRemove( wxCommandEvent& event ) +void ctCustomPropertyDialog::OnPropertyChoiceRemove( wxCommandEvent& WXUNUSED(event) ) { - wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYEDITORTYPE); + /* wxChoice* choice = (wxChoice* ) */ FindWindow(ID_CUSTOMPROPERTYEDITORTYPE); wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES); if (listBox->GetSelection() > -1) { diff --git a/utils/configtool/src/mainframe.cpp b/utils/configtool/src/mainframe.cpp index 332c13518b..8bf876bf69 100644 --- a/utils/configtool/src/mainframe.cpp +++ b/utils/configtool/src/mainframe.cpp @@ -198,7 +198,7 @@ void ctMainFrame::OnCloseWindow(wxCloseEvent& event) Destroy(); } -void ctMainFrame::OnAbout(wxCommandEvent& event) +void ctMainFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { wxString msg = wxGetApp().GetSettings().GetAppName() + wxT(" (c) Julian Smart"); wxString caption = wxT("About ") + wxGetApp().GetSettings().GetAppName(); @@ -215,12 +215,12 @@ void ctMainFrame::OnNew(wxCommandEvent& event) wxGetApp().GetDocManager()->OnFileNew(event); } -void ctMainFrame::OnExit(wxCommandEvent& event) +void ctMainFrame::OnExit(wxCommandEvent& WXUNUSED(event)) { Close(); } -void ctMainFrame::OnSettings(wxCommandEvent& event) +void ctMainFrame::OnSettings(wxCommandEvent& WXUNUSED(event)) { wxGetApp().GetSettings().ShowSettingsDialog(); } @@ -359,7 +359,7 @@ wxMenuBar* ctMainFrame::CreateMenuBar() } /// Handles the Show Toolbar menu event. -void ctMainFrame::OnShowToolbar(wxCommandEvent& event) +void ctMainFrame::OnShowToolbar(wxCommandEvent& WXUNUSED(event)) { wxGetApp().GetSettings().m_showToolBar = !wxGetApp().GetSettings().m_showToolBar; GetToolBar()->Show(wxGetApp().GetSettings().m_showToolBar); @@ -367,19 +367,19 @@ void ctMainFrame::OnShowToolbar(wxCommandEvent& event) } /// Handles the Help Contents menu event. -void ctMainFrame::OnHelp(wxCommandEvent& event) +void ctMainFrame::OnHelp(wxCommandEvent& WXUNUSED(event)) { wxGetApp().GetHelpController().DisplayContents(); } /// Handles context help -void ctMainFrame::OnContextHelp(wxCommandEvent& event) +void ctMainFrame::OnContextHelp(wxCommandEvent& WXUNUSED(event)) { wxContextHelp contextHelp; } /// Handles the Help Contents menu event for the reference manual. -void ctMainFrame::OnReferenceHelp(wxCommandEvent& event) +void ctMainFrame::OnReferenceHelp(wxCommandEvent& WXUNUSED(event)) { wxGetApp().GetReferenceHelpController().DisplayContents(); } @@ -467,7 +467,7 @@ void ctOutputWindow::CreateWindows() } /// Copies the text to the clipboard. -void ctOutputWindow::OnCopyToClipboard(wxCommandEvent& event) +void ctOutputWindow::OnCopyToClipboard(wxCommandEvent& WXUNUSED(event)) { // Try to copy the selection first long int selFrom, selTo; @@ -517,7 +517,7 @@ void ctOutputWindow::SetFilename(const wxString& filename) } /// Saves the file. -void ctOutputWindow::OnSaveText(wxCommandEvent& event) +void ctOutputWindow::OnSaveText(wxCommandEvent& WXUNUSED(event)) { if (m_codeCtrl->IsModified()) { @@ -535,7 +535,7 @@ void ctOutputWindow::OnUpdateSaveText(wxUpdateUIEvent& event) event.Enable(m_doc && m_codeCtrl && m_codeCtrl->IsModified()); } -void ctOutputWindow::OnRegenerate(wxCommandEvent& event) +void ctOutputWindow::OnRegenerate(wxCommandEvent& WXUNUSED(event)) { if (m_doc) { diff --git a/utils/configtool/src/propeditor.cpp b/utils/configtool/src/propeditor.cpp index a9fbb9f54e..94220446de 100644 --- a/utils/configtool/src/propeditor.cpp +++ b/utils/configtool/src/propeditor.cpp @@ -163,7 +163,7 @@ void ctPropertyEditor::ClearEditor() } /// Handles detailed editing event. -void ctPropertyEditor::OnEditDetails(wxCommandEvent& event) +void ctPropertyEditor::OnEditDetails(wxCommandEvent& WXUNUSED(event)) { wxWindow* parentFrame = this; while (parentFrame && !parentFrame->IsKindOf(CLASSINFO(wxFrame))) @@ -435,7 +435,7 @@ ctProperty* ctPropertyEditor::FindProperty(int row) } /// Edit the details of this cell appropriately. -bool ctPropertyEditor::EditDetails(wxWindow* parent) +bool ctPropertyEditor::EditDetails(wxWindow* WXUNUSED(parent)) { if (CanEditDetails()) { @@ -572,7 +572,7 @@ void ctPropertyEditor::OnChangeCell(wxGridEvent& event) } /// Double-click to show specialised editor. -void ctPropertyEditor::OnDClickCell(wxGridEvent& event) +void ctPropertyEditor::OnDClickCell(wxGridEvent& WXUNUSED(event)) { wxWindow* parentFrame = this; while (parentFrame && !parentFrame->IsKindOf(CLASSINFO(wxFrame))) diff --git a/utils/configtool/src/settingsdialog.cpp b/utils/configtool/src/settingsdialog.cpp index 2facda86fb..ead817816d 100644 --- a/utils/configtool/src/settingsdialog.cpp +++ b/utils/configtool/src/settingsdialog.cpp @@ -136,7 +136,7 @@ void ctSettingsDialog::OnCancel( wxCommandEvent& event ) * Event handler for wxID_HELP */ -void ctSettingsDialog::OnHelp( wxCommandEvent& event ) +void ctSettingsDialog::OnHelp( wxCommandEvent& WXUNUSED(event) ) { wxNotebook* notebook = (wxNotebook*) FindWindow(ID_NOTEBOOK); @@ -376,7 +376,7 @@ void ctLocationSettingsDialog::OnUpdateWxwinHierarchy( wxUpdateUIEvent& event ) * Event handler for ID_CHOOSE_WXWIN_HIERARCHY */ -void ctLocationSettingsDialog::OnChooseWxwinHierarchy( wxCommandEvent& event ) +void ctLocationSettingsDialog::OnChooseWxwinHierarchy( wxCommandEvent& WXUNUSED(event) ) { wxTextCtrl* textCtrl = (wxTextCtrl*) FindWindow( ID_WXWIN_HIERARCHY ); wxASSERT( textCtrl != NULL ); diff --git a/utils/configtool/src/utils.cpp b/utils/configtool/src/utils.cpp index 5c4f1182d5..389a8f26fb 100644 --- a/utils/configtool/src/utils.cpp +++ b/utils/configtool/src/utils.cpp @@ -27,6 +27,7 @@ #include "wx/variant.h" #include "wx/cshelp.h" #include "wx/cmdline.h" +#include "wx/imaglist.h" #include @@ -45,17 +46,17 @@ int apDetermineImageType(const wxString& filename) wxSplitPath(filename, & path, & name, & ext); ext.MakeLower(); - if (ext == "jpg" || ext == "jpeg") + if (ext == _T("jpg") || ext == _T("jpeg")) return wxBITMAP_TYPE_JPEG; - else if (ext == "gif") + else if (ext == _T("gif")) return wxBITMAP_TYPE_GIF; - else if (ext == "bmp") + else if (ext == _T("bmp")) return wxBITMAP_TYPE_BMP; - else if (ext == "png") + else if (ext == _T("png")) return wxBITMAP_TYPE_PNG; - else if (ext == "pcx") + else if (ext == _T("pcx")) return wxBITMAP_TYPE_PCX; - else if (ext == "tif" || ext == "tiff") + else if (ext == _T("tif") || ext == _T("tiff")) return wxBITMAP_TYPE_TIF; else return -1; @@ -158,7 +159,7 @@ wxFont apStringToFont(const wxString& str) int apFindNotebookPage(wxNotebook* notebook, const wxString& name) { int i; - for (i = 0; i < notebook->GetPageCount(); i++) + for (i = 0; i < (int)notebook->GetPageCount(); i++) if (name == notebook->GetPageText(i)) return i; return -1; @@ -175,11 +176,11 @@ void apViewHTMLFile(const wxString& url) TCHAR szCmdName[1024]; DWORD dwType, dw = sizeof(szCmdName); LONG lRes; - lRes = RegOpenKey(HKEY_CLASSES_ROOT, "htmlfile\\shell\\open\\command", &hKey); + lRes = RegOpenKey(HKEY_CLASSES_ROOT, _T("htmlfile\\shell\\open\\command"), &hKey); if(lRes == ERROR_SUCCESS && RegQueryValueEx(hKey,(LPTSTR)NULL, NULL, &dwType, (LPBYTE)szCmdName, &dw) == ERROR_SUCCESS) { - strcat(szCmdName, (const char*) url); + wxStrcat(szCmdName, (const wxChar*) url); PROCESS_INFORMATION piProcInfo; STARTUPINFO siStartInfo; memset(&siStartInfo, 0, sizeof(STARTUPINFO)); @@ -312,7 +313,31 @@ wxString apFindAppPath(const wxString& argv0, const wxString& cwd, const wxStrin } // Adds a context-sensitive help button, for non-Windows platforms -void apAddContextHelpButton(wxWindow* parent, wxSizer* sizer, int sizerFlags, int sizerBorder) +void apAddContextHelpButton(wxWindow* + #if defined(__WXGTK__) || defined(__WXMAC__) + parent + #else + WXUNUSED(parent) + #endif + , wxSizer* + #if defined(__WXGTK__) || defined(__WXMAC__) + sizer + #else + WXUNUSED(sizer) + #endif + , int + #if defined(__WXGTK__) || defined(__WXMAC__) + sizerFlags + #else + WXUNUSED(sizerFlags) + #endif + , int + #if defined(__WXGTK__) || defined(__WXMAC__) + sizerBorder + #else + WXUNUSED(sizerBorder) + #endif + ) { #if defined(__WXGTK__) || defined(__WXMAC__) #ifdef __WXMAC__ @@ -458,7 +483,7 @@ wxOutputStream& operator <<(wxOutputStream& stream, long l) return stream << str; } -wxOutputStream& operator <<(wxOutputStream& stream, const char c) +wxOutputStream& operator <<(wxOutputStream& stream, const wxChar c) { wxString str; str.Printf(_T("%c"), c); diff --git a/utils/configtool/src/wxconfigtool.cpp b/utils/configtool/src/wxconfigtool.cpp index 05baa5d69b..8c68072f16 100644 --- a/utils/configtool/src/wxconfigtool.cpp +++ b/utils/configtool/src/wxconfigtool.cpp @@ -93,12 +93,12 @@ bool ctApp::OnInit(void) #ifdef __WXMSW__ // If the development version, go up a directory. - if ((m_appDir.Right(5).CmpNoCase("DEBUG") == 0) || - (m_appDir.Right(11).CmpNoCase("DEBUGSTABLE") == 0) || - (m_appDir.Right(7).CmpNoCase("RELEASE") == 0) || - (m_appDir.Right(13).CmpNoCase("RELEASESTABLE") == 0) || - (m_appDir.Right(10).CmpNoCase("RELEASEDEV") == 0) || - (m_appDir.Right(8).CmpNoCase("DEBUGDEV") == 0) + if ((m_appDir.Right(5).CmpNoCase(_T("DEBUG")) == 0) || + (m_appDir.Right(11).CmpNoCase(_T("DEBUGSTABLE")) == 0) || + (m_appDir.Right(7).CmpNoCase(_T("RELEASE")) == 0) || + (m_appDir.Right(13).CmpNoCase(_T("RELEASESTABLE")) == 0) || + (m_appDir.Right(10).CmpNoCase(_T("RELEASEDEV")) == 0) || + (m_appDir.Right(8).CmpNoCase(_T("DEBUGDEV")) == 0) ) m_appDir = wxPathOnly(m_appDir); #endif