From 2d1fe050b937d6f74ccf3195bc6ac9b95a4c4d8f Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Fri, 26 Aug 2011 01:56:14 +0000 Subject: [PATCH] Fixes use of deprecated wxWidgets constants as they don't work on all platforms (only when the library was built with WXWIN_COMPATIBILITY_2_6). This was SVN commit r10095. --- source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp | 6 +++--- .../CustomControls/EditableListCtrl/QuickFileCtrl.cpp | 4 ++-- .../atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp | 4 ++-- .../atlas/AtlasUI/General/VideoRecorder/VideoRecorder.cpp | 4 ++-- .../tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp | 4 ++-- .../atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp b/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp index 04c99483e1..2a20fa0a73 100644 --- a/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp +++ b/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2011 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -384,7 +384,7 @@ void ActorEditor::OnCreateEntity(wxCommandEvent& WXUNUSED(event)) wxString parentEntityFilename (wxFileSelector(_("Choose a parent entity"), entityPath.GetPath(), _T(""), - _T("xml"), _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxOPEN, this)); + _T("xml"), _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_OPEN, this)); if (! parentEntityFilename.Length()) return; // cancelled by user @@ -394,7 +394,7 @@ void ActorEditor::OnCreateEntity(wxCommandEvent& WXUNUSED(event)) wxString outputEntityFilename (wxFileSelector(_("Choose a filename to save as"), entityPath.GetPath(), entityName, - _T("xml"), _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxSAVE|wxOVERWRITE_PROMPT, this)); + _T("xml"), _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT, this)); if (! outputEntityFilename.Length()) return; // cancelled by user diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp index 39a00a6d4f..88354a8827 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2011 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -138,7 +138,7 @@ public: defaultFile = wxEmptyString; } - wxFileDialog dlg(this, _("Choose a file"), defaultDir, defaultFile, m_FileMask, wxOPEN); + wxFileDialog dlg(this, _("Choose a file"), defaultDir, defaultFile, m_FileMask, wxFD_OPEN); parent->m_DisableKillFocus = true; int ret = dlg.ShowModal(); diff --git a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp index 0f231fd243..872775f08a 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp @@ -215,7 +215,7 @@ void AtlasWindow::OnOpen(wxCommandEvent& WXUNUSED(event)) path = GetDefaultOpenDirectory(); } - wxFileDialog dlg (this, _("Select XML file to open"), path, name, _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxOPEN); + wxFileDialog dlg (this, _("Select XML file to open"), path, name, _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_OPEN); if (dlg.ShowModal() != wxID_OK) return; @@ -262,7 +262,7 @@ bool AtlasWindow::SaveChanges(bool forceSaveAs) wxFileDialog dlg (this, _("Select XML file to save as"), GetCurrentFilename().GetPath(), GetCurrentFilename().GetFullName(), //_T(""), _T(""), - _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxSAVE | wxOVERWRITE_PROMPT); + _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT); if (dlg.ShowModal() != wxID_OK) return false; diff --git a/source/tools/atlas/AtlasUI/General/VideoRecorder/VideoRecorder.cpp b/source/tools/atlas/AtlasUI/General/VideoRecorder/VideoRecorder.cpp index 765b023502..3002d9821e 100644 --- a/source/tools/atlas/AtlasUI/General/VideoRecorder/VideoRecorder.cpp +++ b/source/tools/atlas/AtlasUI/General/VideoRecorder/VideoRecorder.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2011 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -159,7 +159,7 @@ private: wxTextCtrl* filenameWin = wxDynamicCast(FindWindow(ID_FILENAME), wxTextCtrl); wxCHECK(filenameWin, ); - wxFileDialog dlg (this, wxFileSelectorPromptStr, filenameWin->GetValue(), filenameWin->GetValue(), _("MP4 files (*.mp4)|*.mp4"), wxSAVE); + wxFileDialog dlg (this, wxFileSelectorPromptStr, filenameWin->GetValue(), filenameWin->GetValue(), _("MP4 files (*.mp4)|*.mp4"), wxFD_SAVE); if (dlg.ShowModal() != wxID_OK) return; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp index 8c4b9a4ba6..cab82c29d8 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp @@ -637,7 +637,7 @@ void ScenarioEditor::OnOpen(wxCommandEvent& WXUNUSED(event)) wxFileDialog dlg (NULL, wxFileSelectorPromptStr, Datafile::GetDataDirectory() + _T("/mods/public/maps/scenarios"), m_OpenFilename, _T("PMP files (*.pmp)|*.pmp|All files (*.*)|*.*"), - wxOPEN); + wxFD_OPEN); wxString cwd = wxFileName::GetCwd(); @@ -695,7 +695,7 @@ void ScenarioEditor::OnSaveAs(wxCommandEvent& WXUNUSED(event)) wxFileDialog dlg (NULL, wxFileSelectorPromptStr, Datafile::GetDataDirectory() + _T("/mods/public/maps/scenarios"), m_OpenFilename, _T("PMP files (*.pmp)|*.pmp|All files (*.*)|*.*"), - wxSAVE | wxOVERWRITE_PROMPT); + wxFD_SAVE | wxFD_OVERWRITE_PROMPT); if (dlg.ShowModal() == wxID_OK) { diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp index 0ca5db6e5e..02e14bdbfc 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2011 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -115,8 +115,8 @@ public: void RotateTick(float dt) { int dir = 0; - if (wxGetKeyState(WXK_NEXT)) ++dir; // page-down key - if (wxGetKeyState(WXK_PRIOR)) --dir; // page-up key + if (wxGetKeyState(WXK_PAGEDOWN)) ++dir; // page-down key + if (wxGetKeyState(WXK_PAGEUP)) --dir; // page-up key if (dir) { float speed = M_PI/2.f * ScenarioEditor::GetSpeedModifier(); // radians per second