1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Rewrite FileNames::SelectFile using FileTypes...

... And more uniformity in the descriptions of file types used in more than
one place

Also fixes missing translations in VSTEffect.cpp
This commit is contained in:
Paul Licameli
2019-12-26 22:48:00 -05:00
parent 9204319b86
commit aa39f9ade2
18 changed files with 226 additions and 169 deletions

View File

@@ -628,13 +628,13 @@ void LabelDialog::OnImport(wxCommandEvent & WXUNUSED(event))
// Ask user for a filename
wxString fileName =
FileNames::SelectFile(FileNames::Operation::Open,
XO("Select a text file containing labels"),
wxEmptyString, // Path
wxT(""), // Name
wxT("txt"), // Extension
_("Text files (*.txt)|*.txt|All files|*"),
wxRESIZE_BORDER, // Flags
this); // Parent
XO("Select a text file containing labels"),
wxEmptyString, // Path
wxT(""), // Name
wxT("txt"), // Extension
{ FileNames::TextFiles, FileNames::AllFiles },
wxRESIZE_BORDER, // Flags
this); // Parent
// They gave us one...
if (!fileName.empty()) {
@@ -681,7 +681,7 @@ void LabelDialog::OnExport(wxCommandEvent & WXUNUSED(event))
wxEmptyString,
fName,
wxT("txt"),
wxT("*.txt"),
{ FileNames::TextFiles },
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
this);