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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user