mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Sets default wxFileDialog filters in Atlas.
This was SVN commit r10159.
This commit is contained in:
@@ -216,6 +216,8 @@ void AtlasWindow::OnOpen(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
|
||||
wxFileDialog dlg (this, _("Select XML file to open"), path, name, _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_OPEN);
|
||||
// Set default filter
|
||||
dlg.SetFilterIndex(0);
|
||||
|
||||
if (dlg.ShowModal() != wxID_OK)
|
||||
return;
|
||||
@@ -263,6 +265,8 @@ bool AtlasWindow::SaveChanges(bool forceSaveAs)
|
||||
GetCurrentFilename().GetPath(), GetCurrentFilename().GetFullName(),
|
||||
//_T(""), _T(""),
|
||||
_("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
||||
// Set default filter
|
||||
dlg.SetFilterIndex(0);
|
||||
|
||||
if (dlg.ShowModal() != wxID_OK)
|
||||
return false;
|
||||
|
||||
@@ -650,6 +650,8 @@ void ScenarioEditor::OnOpen(wxCommandEvent& WXUNUSED(event))
|
||||
Datafile::GetDataDirectory() + _T("/mods/public/maps/scenarios"), m_OpenFilename,
|
||||
_T("PMP files (*.pmp)|*.pmp|All files (*.*)|*.*"),
|
||||
wxFD_OPEN);
|
||||
// Set default filter
|
||||
dlg.SetFilterIndex(0);
|
||||
|
||||
wxString cwd = wxFileName::GetCwd();
|
||||
|
||||
@@ -708,6 +710,8 @@ void ScenarioEditor::OnSaveAs(wxCommandEvent& WXUNUSED(event))
|
||||
Datafile::GetDataDirectory() + _T("/mods/public/maps/scenarios"), m_OpenFilename,
|
||||
_T("PMP files (*.pmp)|*.pmp|All files (*.*)|*.*"),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
||||
// Set default filter
|
||||
dlg.SetFilterIndex(0);
|
||||
|
||||
if (dlg.ShowModal() == wxID_OK)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user