1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-23 14:41:27 +01:00

Multiple export dialog bugs fixed

Bug 2062 - Export as WAV does not remember the previously used setting
Bug 1355 - "Other uncompressed files" does not (visually) update target
           file extension according to the chosen "Header" type
Bug 1356 - "Other uncompressed files" forces the default extension for
           the format in the exported file
Bug 1381 - Export other uncompressed formats incorrectly assumes max 255
           channels

(and possibly others...not the best bugzilla searcher)
This commit is contained in:
Leland Lucius
2020-03-23 00:47:17 -05:00
parent 8570ab7402
commit 38bf51afea
9 changed files with 456 additions and 281 deletions

View File

@@ -721,6 +721,28 @@ void FileDialog::GetFilenames(wxArrayString& files) const
files = m_fileNames;
}
void FileDialog::SetFileExtension(const wxString& extension)
{
if (mParentDlg)
{
wxChar path[wxMAXPATH];
if (CommDlg_OpenSave_GetFilePath(mParentDlg, path, WXSIZEOF(path)))
{
wxFileName fn(path);
fn.SetExt(extension);
// Change the currently entered file name.
CommDlg_OpenSave_SetControlText(mParentDlg, edt1, fn.GetFullName().t_str());
// Make this the default extension as well. So if the user specifies a file
// name without an extension, this one will be used instead of the first
// extension in the filter list.
CommDlg_OpenSave_SetDefExt(mParentDlg, fn.GetExt().t_str());
}
}
}
void FileDialog::DoGetPosition( int *x, int *y ) const
{
if (x)