Fix for bug #387
As this is a reversal of change committed in 2007 with no real explanation or history behind that change other than it was done for Export, we should probably give exporting a bit of a workout.
This commit is contained in:
parent
01f28f645d
commit
4d0de66523
|
@ -845,12 +845,8 @@ int FileDialog::ShowModal()
|
|||
//=== Adding the correct extension >>=================================
|
||||
m_filterIndex = (int)of.nFilterIndex - 1;
|
||||
|
||||
#if 0
|
||||
// LLL: Removed to prevent adding extension during Export
|
||||
// processing.
|
||||
|
||||
if ( !of.nFileExtension ||
|
||||
(of.nFileExtension && fileNameBuffer[of.nFileExtension] == wxT('\0')) )
|
||||
(of.nFileExtension && fileNameBuffer[of.nFileExtension] == wxT('\0')) )
|
||||
{
|
||||
// User has typed a filename without an extension:
|
||||
const wxChar* extension = filterBuffer;
|
||||
|
@ -863,7 +859,7 @@ int FileDialog::ShowModal()
|
|||
wxStrncpy(fileNameBuffer, m_fileName.c_str(), wxMin(m_fileName.Len(), wxMAXPATH-1));
|
||||
fileNameBuffer[wxMin(m_fileName.Len(), wxMAXPATH-1)] = wxT('\0');
|
||||
}
|
||||
#endif
|
||||
|
||||
m_path = fileNameBuffer;
|
||||
m_fileName = wxFileNameFromPath(fileNameBuffer);
|
||||
m_fileNames.Add(m_fileName);
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
#include <wx/string.h>
|
||||
#include <wx/textdlg.h>
|
||||
#include <wx/ffile.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/filefn.h>
|
||||
#include <wx/stdpaths.h>
|
||||
#include <wx/settings.h>
|
||||
|
@ -99,6 +98,8 @@
|
|||
#include "../WaveTrack.h"
|
||||
#include "../float_cast.h"
|
||||
|
||||
#include "FileDialog.h"
|
||||
|
||||
#include "Equalization.h"
|
||||
|
||||
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
|
||||
|
@ -3218,7 +3219,7 @@ void EditCurvesDialog::OnDelete(wxCommandEvent & WXUNUSED(event))
|
|||
|
||||
void EditCurvesDialog::OnImport( wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
wxFileDialog filePicker(this, _("Choose an EQ curve file"), FileNames::DataDir(), wxT(""), _("xml files (*.xml;*.XML)|*.xml;*.XML"));
|
||||
FileDialog filePicker(this, _("Choose an EQ curve file"), FileNames::DataDir(), wxT(""), _("xml files (*.xml;*.XML)|*.xml;*.XML"));
|
||||
wxString fileName = wxT("");
|
||||
if( filePicker.ShowModal() == wxID_CANCEL)
|
||||
return;
|
||||
|
@ -3238,7 +3239,7 @@ void EditCurvesDialog::OnImport( wxCommandEvent & WXUNUSED(event))
|
|||
|
||||
void EditCurvesDialog::OnExport( wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
wxFileDialog filePicker(this, _("Export EQ curves as..."), FileNames::DataDir(), wxT(""), wxT("*.XML"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER); // wxFD_CHANGE_DIR?
|
||||
FileDialog filePicker(this, _("Export EQ curves as..."), FileNames::DataDir(), wxT(""), wxT("*.XML"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER); // wxFD_CHANGE_DIR?
|
||||
wxString fileName = wxT("");
|
||||
if( filePicker.ShowModal() == wxID_CANCEL)
|
||||
return;
|
||||
|
|
|
@ -1927,12 +1927,12 @@ void NyquistEffect::OnLoad(wxCommandEvent & WXUNUSED(evt))
|
|||
}
|
||||
}
|
||||
|
||||
wxFileDialog dlog(mUIParent,
|
||||
_("Load Nyquist script"),
|
||||
mFileName.GetPath(),
|
||||
wxEmptyString,
|
||||
_("Nyquist scripts (*.ny)|*.ny|Lisp scripts (*.lsp)|*.lsp|Text files (*.txt)|*.txt|All files|*"),
|
||||
wxFD_OPEN | wxRESIZE_BORDER);
|
||||
FileDialog dlog(mUIParent,
|
||||
_("Load Nyquist script"),
|
||||
mFileName.GetPath(),
|
||||
wxEmptyString,
|
||||
_("Nyquist scripts (*.ny)|*.ny|Lisp scripts (*.lsp)|*.lsp|Text files (*.txt)|*.txt|All files|*"),
|
||||
wxFD_OPEN | wxRESIZE_BORDER);
|
||||
|
||||
if (dlog.ShowModal() != wxID_OK)
|
||||
{
|
||||
|
@ -1949,12 +1949,12 @@ void NyquistEffect::OnLoad(wxCommandEvent & WXUNUSED(evt))
|
|||
|
||||
void NyquistEffect::OnSave(wxCommandEvent & WXUNUSED(evt))
|
||||
{
|
||||
wxFileDialog dlog(mUIParent,
|
||||
_("Save Nyquist script"),
|
||||
mFileName.GetPath(),
|
||||
mFileName.GetFullName(),
|
||||
_("Nyquist scripts (*.ny)|*.ny|Lisp scripts (*.lsp)|*.lsp|All files|*"),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER);
|
||||
FileDialog dlog(mUIParent,
|
||||
_("Save Nyquist script"),
|
||||
mFileName.GetPath(),
|
||||
mFileName.GetFullName(),
|
||||
_("Nyquist scripts (*.ny)|*.ny|Lisp scripts (*.lsp)|*.lsp|All files|*"),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER);
|
||||
|
||||
if (dlog.ShowModal() != wxID_OK)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue