mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-27 07:43:50 +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:
@@ -228,13 +228,13 @@ void OnExportLabels(const CommandContext &context)
|
||||
fName = (*trackRange.rbegin())->GetName();
|
||||
|
||||
fName = FileNames::SelectFile(FileNames::Operation::Export,
|
||||
XO("Export Labels As:"),
|
||||
wxEmptyString,
|
||||
fName,
|
||||
wxT("txt"),
|
||||
wxT("*.txt"),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||
&window);
|
||||
XO("Export Labels As:"),
|
||||
wxEmptyString,
|
||||
fName,
|
||||
wxT("txt"),
|
||||
{ FileNames::TextFiles },
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||
&window);
|
||||
|
||||
if (fName.empty())
|
||||
return;
|
||||
@@ -318,7 +318,10 @@ void OnExportMIDI(const CommandContext &context)
|
||||
wxEmptyString,
|
||||
fName,
|
||||
wxT("mid"),
|
||||
_("MIDI file (*.mid)|*.mid|Allegro file (*.gro)|*.gro"),
|
||||
{
|
||||
{ XO("MIDI file"), { wxT("mid") }, true },
|
||||
{ XO("Allegro file"), { wxT("gro") }, true },
|
||||
},
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||
&window);
|
||||
|
||||
@@ -415,13 +418,13 @@ void OnImportLabels(const CommandContext &context)
|
||||
|
||||
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
|
||||
&window); // Parent
|
||||
XO("Select a text file containing labels"),
|
||||
wxEmptyString, // Path
|
||||
wxT(""), // Name
|
||||
wxT("txt"), // Extension
|
||||
{ FileNames::TextFiles, FileNames::AllFiles },
|
||||
wxRESIZE_BORDER, // Flags
|
||||
&window); // Parent
|
||||
|
||||
if (!fileName.empty()) {
|
||||
wxTextFile f;
|
||||
@@ -463,7 +466,15 @@ void OnImportMIDI(const CommandContext &context)
|
||||
wxEmptyString, // Path
|
||||
wxT(""), // Name
|
||||
wxT(""), // Extension
|
||||
_("MIDI and Allegro files (*.mid;*.midi;*.gro)|*.mid;*.midi;*.gro|MIDI files (*.mid;*.midi)|*.mid;*.midi|Allegro files (*.gro)|*.gro|All files|*"),
|
||||
{
|
||||
{ XO("MIDI and Allegro files"),
|
||||
{ wxT("mid"), wxT("midi"), wxT("gro"), }, true },
|
||||
{ XO("MIDI files"),
|
||||
{ wxT("mid"), wxT("midi"), }, true },
|
||||
{ XO("Allegro files"),
|
||||
{ wxT("gro"), }, true },
|
||||
FileNames::AllFiles
|
||||
},
|
||||
wxRESIZE_BORDER, // Flags
|
||||
&window); // Parent
|
||||
|
||||
@@ -480,13 +491,13 @@ void OnImportRaw(const CommandContext &context)
|
||||
|
||||
wxString fileName =
|
||||
FileNames::SelectFile(FileNames::Operation::Open,
|
||||
XO("Select any uncompressed audio file"),
|
||||
wxEmptyString, // Path
|
||||
wxT(""), // Name
|
||||
wxT(""), // Extension
|
||||
_("All files|*"),
|
||||
wxRESIZE_BORDER, // Flags
|
||||
&window); // Parent
|
||||
XO("Select any uncompressed audio file"),
|
||||
wxEmptyString, // Path
|
||||
wxT(""), // Name
|
||||
wxT(""), // Extension
|
||||
{ FileNames::AllFiles },
|
||||
wxRESIZE_BORDER, // Flags
|
||||
&window); // Parent
|
||||
|
||||
if (fileName.empty())
|
||||
return;
|
||||
|
||||
@@ -63,7 +63,7 @@ void ShowDiagnostics(
|
||||
wxEmptyString,
|
||||
defaultPath,
|
||||
wxT("txt"),
|
||||
wxT("*.txt"),
|
||||
{ FileNames::TextFiles },
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||
&window);
|
||||
if (!fName.empty())
|
||||
|
||||
Reference in New Issue
Block a user