mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 08:30:06 +02: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:
parent
9204319b86
commit
aa39f9ade2
@ -255,7 +255,7 @@ void AudacityLogger::OnSave(wxCommandEvent & WXUNUSED(e))
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
fName,
|
fName,
|
||||||
wxT("txt"),
|
wxT("txt"),
|
||||||
wxT("*.txt"),
|
{ FileNames::TextFiles },
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||||
mFrame.get());
|
mFrame.get());
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ void BenchmarkDialog::OnSave( wxCommandEvent & WXUNUSED(event))
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
fName,
|
fName,
|
||||||
wxT("txt"),
|
wxT("txt"),
|
||||||
wxT("*.txt"),
|
{ FileNames::TextFiles },
|
||||||
wxFD_SAVE | wxRESIZE_BORDER,
|
wxFD_SAVE | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
|
@ -449,7 +449,8 @@ class FindFFmpegDialog final : public wxDialogWrapper
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FindFFmpegDialog(wxWindow *parent, const wxString &path, const wxString &name, const wxString &type)
|
FindFFmpegDialog(wxWindow *parent, const wxString &path, const wxString &name,
|
||||||
|
FileNames::FileTypes types)
|
||||||
: wxDialogWrapper(parent, wxID_ANY, XO("Locate FFmpeg"))
|
: wxDialogWrapper(parent, wxID_ANY, XO("Locate FFmpeg"))
|
||||||
{
|
{
|
||||||
SetName();
|
SetName();
|
||||||
@ -457,7 +458,7 @@ public:
|
|||||||
|
|
||||||
mPath = path;
|
mPath = path;
|
||||||
mName = name;
|
mName = name;
|
||||||
mType = type;
|
mTypes = std::move( types );
|
||||||
|
|
||||||
mLibPath.Assign(mPath, mName);
|
mLibPath.Assign(mPath, mName);
|
||||||
|
|
||||||
@ -522,7 +523,7 @@ public:
|
|||||||
mLibPath.GetPath(),
|
mLibPath.GetPath(),
|
||||||
mLibPath.GetName(),
|
mLibPath.GetName(),
|
||||||
wxT(""),
|
wxT(""),
|
||||||
mType,
|
mTypes,
|
||||||
wxFD_OPEN | wxRESIZE_BORDER,
|
wxFD_OPEN | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
if (!path.empty()) {
|
if (!path.empty()) {
|
||||||
@ -547,7 +548,7 @@ private:
|
|||||||
|
|
||||||
wxString mPath;
|
wxString mPath;
|
||||||
wxString mName;
|
wxString mName;
|
||||||
wxString mType;
|
FileNames::FileTypes mTypes;
|
||||||
|
|
||||||
wxTextCtrl *mPathText;
|
wxTextCtrl *mPathText;
|
||||||
|
|
||||||
@ -659,7 +660,7 @@ bool FFmpegLibs::FindLibs(wxWindow *parent)
|
|||||||
FindFFmpegDialog fd(parent,
|
FindFFmpegDialog fd(parent,
|
||||||
path,
|
path,
|
||||||
name,
|
name,
|
||||||
GetLibraryTypeString());
|
GetLibraryTypes());
|
||||||
|
|
||||||
if (fd.ShowModal() == wxID_CANCEL) {
|
if (fd.ShowModal() == wxID_CANCEL) {
|
||||||
wxLogMessage(wxT("User canceled the dialog. Failed to find FFmpeg libraries."));
|
wxLogMessage(wxT("User canceled the dialog. Failed to find FFmpeg libraries."));
|
||||||
|
23
src/FFmpeg.h
23
src/FFmpeg.h
@ -242,10 +242,14 @@ public:
|
|||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
/* Library names and file filters for Windows only */
|
/* Library names and file filters for Windows only */
|
||||||
|
|
||||||
wxString GetLibraryTypeString()
|
FileNames::FileTypes GetLibraryTypes()
|
||||||
{
|
{
|
||||||
|
return {
|
||||||
/* i18n-hint: do not translate avformat. Preserve the computer gibberish.*/
|
/* i18n-hint: do not translate avformat. Preserve the computer gibberish.*/
|
||||||
return _("Only avformat.dll|*avformat*.dll|Dynamically Linked Libraries (*.dll)|*.dll|All Files|*");
|
{ XO("Only avformat.dll"), { wxT("avformat.dll") } },
|
||||||
|
FileNames::DynamicLibraries,
|
||||||
|
FileNames::AllFiles
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString GetLibAVFormatPath()
|
wxString GetLibAVFormatPath()
|
||||||
@ -276,9 +280,12 @@ public:
|
|||||||
}
|
}
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
/* Library names and file filters for Mac OS only */
|
/* Library names and file filters for Mac OS only */
|
||||||
wxString GetLibraryTypeString()
|
FileNames::FileTypes GetLibraryTypes()
|
||||||
{
|
{
|
||||||
return _("Dynamic Libraries (*.dylib)|*.dylib|All Files (*)|*");
|
return {
|
||||||
|
FileNames::DynamicLibraries,
|
||||||
|
FileNames::AllFiles
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString GetLibAVFormatPath()
|
wxString GetLibAVFormatPath()
|
||||||
@ -309,9 +316,13 @@ public:
|
|||||||
#else
|
#else
|
||||||
/* Library names and file filters for other platforms, basically Linux and
|
/* Library names and file filters for other platforms, basically Linux and
|
||||||
* other *nix platforms */
|
* other *nix platforms */
|
||||||
wxString GetLibraryTypeString()
|
FileNames::FileTypes GetLibraryTypes()
|
||||||
{
|
{
|
||||||
return _("Only libavformat.so|libavformat*.so*|Dynamically Linked Libraries (*.so*)|*.so*|All Files (*)|*");
|
return {
|
||||||
|
{ XO("Only libavformat.so"), { wxT("libavformat*.so*") } },
|
||||||
|
FileNames::DynamicLibraries,
|
||||||
|
FileNames::AllFiles
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString GetLibAVFormatPath()
|
wxString GetLibAVFormatPath()
|
||||||
|
@ -562,7 +562,7 @@ FileNames::SelectFile(Operation op,
|
|||||||
const FilePath& default_path,
|
const FilePath& default_path,
|
||||||
const FilePath& default_filename,
|
const FilePath& default_filename,
|
||||||
const FileExtension& default_extension,
|
const FileExtension& default_extension,
|
||||||
const wxString& wildcard,
|
const FileTypes& fileTypes,
|
||||||
int flags,
|
int flags,
|
||||||
wxWindow *parent)
|
wxWindow *parent)
|
||||||
{
|
{
|
||||||
@ -572,7 +572,8 @@ FileNames::SelectFile(Operation op,
|
|||||||
filter = wxT("*.") + default_extension;
|
filter = wxT("*.") + default_extension;
|
||||||
return FileSelector(
|
return FileSelector(
|
||||||
message.Translation(), path, default_filename, filter,
|
message.Translation(), path, default_filename, filter,
|
||||||
wildcard, flags, parent, wxDefaultCoord, wxDefaultCoord);
|
FormatWildcard( fileTypes ),
|
||||||
|
flags, parent, wxDefaultCoord, wxDefaultCoord);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -711,7 +712,7 @@ char *FileNames::VerifyFilename(const wxString &s, bool input)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
wxFileName ff(name);
|
wxFileName ff(name);
|
||||||
wxString ext;
|
FileExtension ext;
|
||||||
while ((char *) (const char *)name.mb_str() == NULL) {
|
while ((char *) (const char *)name.mb_str() == NULL) {
|
||||||
AudacityMessageBox(
|
AudacityMessageBox(
|
||||||
XO(
|
XO(
|
||||||
@ -723,7 +724,10 @@ char *FileNames::VerifyFilename(const wxString &s, bool input)
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
name,
|
name,
|
||||||
ext,
|
ext,
|
||||||
ext.empty() ? wxT("*") : (wxT("*.") + ext),
|
{ ext.empty()
|
||||||
|
? FileNames::AllFiles
|
||||||
|
: FileType{ {}, { ext } }
|
||||||
|
},
|
||||||
wxFD_SAVE | wxRESIZE_BORDER,
|
wxFD_SAVE | wxRESIZE_BORDER,
|
||||||
wxGetTopLevelParent(NULL));
|
wxGetTopLevelParent(NULL));
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ public:
|
|||||||
const FilePath& default_path,
|
const FilePath& default_path,
|
||||||
const FilePath& default_filename,
|
const FilePath& default_filename,
|
||||||
const FileExtension& default_extension,
|
const FileExtension& default_extension,
|
||||||
const wxString& wildcard,
|
const FileTypes& fileTypes,
|
||||||
int flags,
|
int flags,
|
||||||
wxWindow *parent);
|
wxWindow *parent);
|
||||||
|
|
||||||
|
@ -1070,7 +1070,7 @@ void FrequencyPlotDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
fName,
|
fName,
|
||||||
wxT("txt"),
|
wxT("txt"),
|
||||||
_("Text files (*.txt)|*.txt|All files|*"),
|
{ FileNames::TextFiles, FileNames::AllFiles },
|
||||||
wxFD_SAVE | wxRESIZE_BORDER,
|
wxFD_SAVE | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
|
@ -632,7 +632,7 @@ void LabelDialog::OnImport(wxCommandEvent & WXUNUSED(event))
|
|||||||
wxEmptyString, // Path
|
wxEmptyString, // Path
|
||||||
wxT(""), // Name
|
wxT(""), // Name
|
||||||
wxT("txt"), // Extension
|
wxT("txt"), // Extension
|
||||||
_("Text files (*.txt)|*.txt|All files|*"),
|
{ FileNames::TextFiles, FileNames::AllFiles },
|
||||||
wxRESIZE_BORDER, // Flags
|
wxRESIZE_BORDER, // Flags
|
||||||
this); // Parent
|
this); // Parent
|
||||||
|
|
||||||
@ -681,7 +681,7 @@ void LabelDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
fName,
|
fName,
|
||||||
wxT("txt"),
|
wxT("txt"),
|
||||||
wxT("*.txt"),
|
{ FileNames::TextFiles },
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
|
@ -849,7 +849,7 @@ For an audio file that will open in other apps, use 'Export'.\n");
|
|||||||
filename.GetPath(),
|
filename.GetPath(),
|
||||||
filename.GetFullName(),
|
filename.GetFullName(),
|
||||||
wxT("aup"),
|
wxT("aup"),
|
||||||
_("Audacity projects") + wxT(" (*.aup)|*.aup"),
|
{ FileNames::AudacityProjects },
|
||||||
wxFD_SAVE | wxRESIZE_BORDER,
|
wxFD_SAVE | wxRESIZE_BORDER,
|
||||||
&window);
|
&window);
|
||||||
|
|
||||||
|
@ -1238,7 +1238,7 @@ void TagsEditorDialog::OnLoad(wxCommandEvent & WXUNUSED(event))
|
|||||||
FileNames::DataDir(),
|
FileNames::DataDir(),
|
||||||
wxT("Tags.xml"),
|
wxT("Tags.xml"),
|
||||||
wxT("xml"),
|
wxT("xml"),
|
||||||
wxT("*.xml"),
|
{ FileNames::XMLFiles },
|
||||||
wxFD_OPEN | wxRESIZE_BORDER,
|
wxFD_OPEN | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
@ -1294,7 +1294,7 @@ void TagsEditorDialog::OnSave(wxCommandEvent & WXUNUSED(event))
|
|||||||
FileNames::DataDir(),
|
FileNames::DataDir(),
|
||||||
wxT("Tags.xml"),
|
wxT("Tags.xml"),
|
||||||
wxT("xml"),
|
wxT("xml"),
|
||||||
wxT("*.xml"),
|
{ FileNames::XMLFiles },
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ void TimerRecordDialog::OnAutoSavePathButton_Click(wxCommandEvent& WXUNUSED(even
|
|||||||
m_fnAutoSaveFile.GetPath(),
|
m_fnAutoSaveFile.GetPath(),
|
||||||
m_fnAutoSaveFile.GetFullName(),
|
m_fnAutoSaveFile.GetFullName(),
|
||||||
wxT("aup"),
|
wxT("aup"),
|
||||||
_("Audacity projects") + wxT(" (*.aup)|*.aup"),
|
{ FileNames::AudacityProjects },
|
||||||
wxFD_SAVE | wxRESIZE_BORDER,
|
wxFD_SAVE | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
|
@ -536,7 +536,7 @@ void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
fName,
|
fName,
|
||||||
wxT("txt"),
|
wxT("txt"),
|
||||||
_("Text files (*.txt)|*.txt|All files|*"),
|
{ FileNames::TextFiles, FileNames::AllFiles },
|
||||||
wxFD_SAVE | wxRESIZE_BORDER,
|
wxFD_SAVE | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
|
@ -1865,7 +1865,11 @@ void VSTEffect::ExportPresets()
|
|||||||
FileNames::DataDir(),
|
FileNames::DataDir(),
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
wxT("xml"),
|
wxT("xml"),
|
||||||
wxT("Standard VST bank file (*.fxb)|*.fxb|Standard VST program file (*.fxp)|*.fxp|Audacity VST preset file (*.xml)|*.xml"),
|
{
|
||||||
|
{ XO("Standard VST bank file"), { wxT("fxb") }, true },
|
||||||
|
{ XO("Standard VST program file"), { wxT("fxp") }, true },
|
||||||
|
{ XO("Audacity VST preset file"), { wxT("xml") }, true },
|
||||||
|
},
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
@ -1918,7 +1922,11 @@ void VSTEffect::ImportPresets()
|
|||||||
FileNames::DataDir(),
|
FileNames::DataDir(),
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
wxT("xml"),
|
wxT("xml"),
|
||||||
wxT("VST preset files (*.fxb; *.fxp; *.xml)|*.fxb;*.fxp;*.xml"),
|
{ {
|
||||||
|
XO("VST preset files"),
|
||||||
|
{ wxT("fxb"), wxT("fxp"), wxT("xml") },
|
||||||
|
true
|
||||||
|
} },
|
||||||
wxFD_OPEN | wxRESIZE_BORDER,
|
wxFD_OPEN | wxRESIZE_BORDER,
|
||||||
mParent);
|
mParent);
|
||||||
|
|
||||||
|
@ -175,10 +175,13 @@ bool ExportCLOptions::TransferDataFromWindow()
|
|||||||
void ExportCLOptions::OnBrowse(wxCommandEvent& WXUNUSED(event))
|
void ExportCLOptions::OnBrowse(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxString path;
|
wxString path;
|
||||||
wxString ext;
|
FileExtension ext;
|
||||||
|
FileNames::FileType type = FileNames::AllFiles;
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
ext = wxT("exe");
|
ext = wxT("exe");
|
||||||
|
/* i18n-hint files that can be run as programs */
|
||||||
|
type = { XO("Executables"), { ext } };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
path = FileNames::SelectFile(FileNames::Operation::Open,
|
path = FileNames::SelectFile(FileNames::Operation::Open,
|
||||||
@ -186,7 +189,7 @@ void ExportCLOptions::OnBrowse(wxCommandEvent& WXUNUSED(event))
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
ext,
|
ext,
|
||||||
ext.empty() ? wxT("*") : (wxT("*.") + ext),
|
{ type },
|
||||||
wxFD_OPEN | wxRESIZE_BORDER,
|
wxFD_OPEN | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
if (path.empty()) {
|
if (path.empty()) {
|
||||||
|
@ -553,7 +553,8 @@ public:
|
|||||||
|
|
||||||
#ifndef DISABLE_DYNAMIC_LOADING_LAME
|
#ifndef DISABLE_DYNAMIC_LOADING_LAME
|
||||||
|
|
||||||
FindDialog(wxWindow *parent, wxString path, wxString name, wxString type)
|
FindDialog(wxWindow *parent, wxString path, wxString name,
|
||||||
|
FileNames::FileTypes types)
|
||||||
: wxDialogWrapper(parent, wxID_ANY,
|
: wxDialogWrapper(parent, wxID_ANY,
|
||||||
/* i18n-hint: LAME is the name of an MP3 converter and should not be translated*/
|
/* i18n-hint: LAME is the name of an MP3 converter and should not be translated*/
|
||||||
XO("Locate LAME"))
|
XO("Locate LAME"))
|
||||||
@ -563,7 +564,7 @@ public:
|
|||||||
|
|
||||||
mPath = path;
|
mPath = path;
|
||||||
mName = name;
|
mName = name;
|
||||||
mType = type;
|
mTypes = std::move( types );
|
||||||
|
|
||||||
mLibPath.Assign(mPath, mName);
|
mLibPath.Assign(mPath, mName);
|
||||||
|
|
||||||
@ -630,7 +631,7 @@ public:
|
|||||||
mLibPath.GetPath(),
|
mLibPath.GetPath(),
|
||||||
mLibPath.GetName(),
|
mLibPath.GetName(),
|
||||||
wxT(""),
|
wxT(""),
|
||||||
mType,
|
mTypes,
|
||||||
wxFD_OPEN | wxRESIZE_BORDER,
|
wxFD_OPEN | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
if (!path.empty()) {
|
if (!path.empty()) {
|
||||||
@ -658,7 +659,7 @@ private:
|
|||||||
|
|
||||||
wxString mPath;
|
wxString mPath;
|
||||||
wxString mName;
|
wxString mName;
|
||||||
wxString mType;
|
FileNames::FileTypes mTypes;
|
||||||
#endif // DISABLE_DYNAMIC_LOADING_LAME
|
#endif // DISABLE_DYNAMIC_LOADING_LAME
|
||||||
|
|
||||||
wxTextCtrl *mPathText;
|
wxTextCtrl *mPathText;
|
||||||
@ -800,7 +801,7 @@ public:
|
|||||||
wxString GetLibraryVersion();
|
wxString GetLibraryVersion();
|
||||||
wxString GetLibraryName();
|
wxString GetLibraryName();
|
||||||
wxString GetLibraryPath();
|
wxString GetLibraryPath();
|
||||||
wxString GetLibraryTypeString();
|
FileNames::FileTypes GetLibraryTypes();
|
||||||
|
|
||||||
/* returns the number of samples PER CHANNEL to send for each call to EncodeBuffer */
|
/* returns the number of samples PER CHANNEL to send for each call to EncodeBuffer */
|
||||||
int InitializeStream(unsigned channels, int sampleRate);
|
int InitializeStream(unsigned channels, int sampleRate);
|
||||||
@ -944,7 +945,7 @@ bool MP3Exporter::FindLibrary(wxWindow *parent)
|
|||||||
FindDialog fd(parent,
|
FindDialog fd(parent,
|
||||||
path,
|
path,
|
||||||
name,
|
name,
|
||||||
GetLibraryTypeString());
|
GetLibraryTypes());
|
||||||
|
|
||||||
if (fd.ShowModal() == wxID_CANCEL) {
|
if (fd.ShowModal() == wxID_CANCEL) {
|
||||||
return false;
|
return false;
|
||||||
@ -1493,9 +1494,13 @@ wxString MP3Exporter::GetLibraryName()
|
|||||||
return wxT("lame_enc.dll");
|
return wxT("lame_enc.dll");
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString MP3Exporter::GetLibraryTypeString()
|
FileNames::FileTypes MP3Exporter::GetLibraryTypes()
|
||||||
{
|
{
|
||||||
return _("Only lame_enc.dll|lame_enc.dll|Dynamically Linked Libraries (*.dll)|*.dll|All Files|*");
|
return {
|
||||||
|
{ XO("Only lame_enc.dll"), { wxT("lame_enc.dll") } },
|
||||||
|
FileNames::DynamicLibraries,
|
||||||
|
FileNames::AllFiles
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
@ -1527,11 +1532,20 @@ wxString MP3Exporter::GetLibraryName()
|
|||||||
return wxT("libmp3lame.dylib");
|
return wxT("libmp3lame.dylib");
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString MP3Exporter::GetLibraryTypeString()
|
FileNames::FileTypes MP3Exporter::GetLibraryTypes()
|
||||||
{
|
{
|
||||||
if (sizeof(void*) == 8)
|
return {
|
||||||
return wxString(_("Only libmp3lame64bit.dylib|libmp3lame64bit.dylib|Dynamic Libraries (*.dylib)|*.dylib|All Files (*)|*"));
|
(sizeof(void*) == 8)
|
||||||
return wxString(_("Only libmp3lame.dylib|libmp3lame.dylib|Dynamic Libraries (*.dylib)|*.dylib|All Files (*)|*"));
|
? FileNames::FileType{
|
||||||
|
XO("Only libmp3lame64bit.dylib"), { wxT("libmp3lame64bit.dylib") }
|
||||||
|
}
|
||||||
|
: FileNames::FileType{
|
||||||
|
XO("Only libmp3lame.dylib"), { wxT("libmp3lame.dylib") }
|
||||||
|
}
|
||||||
|
,
|
||||||
|
FileNames::DynamicLibraries,
|
||||||
|
FileNames::AllFiles
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#else //!__WXMAC__
|
#else //!__WXMAC__
|
||||||
@ -1547,9 +1561,14 @@ wxString MP3Exporter::GetLibraryName()
|
|||||||
return wxT("libmp3lame.so.0");
|
return wxT("libmp3lame.so.0");
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString MP3Exporter::GetLibraryTypeString()
|
FileNames::FileTypes MP3Exporter::GetLibraryTypes()
|
||||||
{
|
{
|
||||||
return wxString(_("Only libmp3lame.so.0|libmp3lame.so.0|Primary Shared Object files (*.so)|*.so|Extended Libraries (*.so*)|*.so*|All Files (*)|*"));
|
return {
|
||||||
|
{ XO("Only libmp3lame.so.0"), { wxT("libmp3lame.so.0") } },
|
||||||
|
{ XO("Primary shared object files"), { wxT("so") }, true },
|
||||||
|
{ XO("Extended libraries"), { wxT("so*") }, true },
|
||||||
|
FileNames::AllFiles
|
||||||
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ void OnExportLabels(const CommandContext &context)
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
fName,
|
fName,
|
||||||
wxT("txt"),
|
wxT("txt"),
|
||||||
wxT("*.txt"),
|
{ FileNames::TextFiles },
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||||
&window);
|
&window);
|
||||||
|
|
||||||
@ -318,7 +318,10 @@ void OnExportMIDI(const CommandContext &context)
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
fName,
|
fName,
|
||||||
wxT("mid"),
|
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,
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||||
&window);
|
&window);
|
||||||
|
|
||||||
@ -419,7 +422,7 @@ void OnImportLabels(const CommandContext &context)
|
|||||||
wxEmptyString, // Path
|
wxEmptyString, // Path
|
||||||
wxT(""), // Name
|
wxT(""), // Name
|
||||||
wxT("txt"), // Extension
|
wxT("txt"), // Extension
|
||||||
_("Text files (*.txt)|*.txt|All files|*"),
|
{ FileNames::TextFiles, FileNames::AllFiles },
|
||||||
wxRESIZE_BORDER, // Flags
|
wxRESIZE_BORDER, // Flags
|
||||||
&window); // Parent
|
&window); // Parent
|
||||||
|
|
||||||
@ -463,7 +466,15 @@ void OnImportMIDI(const CommandContext &context)
|
|||||||
wxEmptyString, // Path
|
wxEmptyString, // Path
|
||||||
wxT(""), // Name
|
wxT(""), // Name
|
||||||
wxT(""), // Extension
|
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
|
wxRESIZE_BORDER, // Flags
|
||||||
&window); // Parent
|
&window); // Parent
|
||||||
|
|
||||||
@ -484,7 +495,7 @@ void OnImportRaw(const CommandContext &context)
|
|||||||
wxEmptyString, // Path
|
wxEmptyString, // Path
|
||||||
wxT(""), // Name
|
wxT(""), // Name
|
||||||
wxT(""), // Extension
|
wxT(""), // Extension
|
||||||
_("All files|*"),
|
{ FileNames::AllFiles },
|
||||||
wxRESIZE_BORDER, // Flags
|
wxRESIZE_BORDER, // Flags
|
||||||
&window); // Parent
|
&window); // Parent
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ void ShowDiagnostics(
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
defaultPath,
|
defaultPath,
|
||||||
wxT("txt"),
|
wxT("txt"),
|
||||||
wxT("*.txt"),
|
{ FileNames::TextFiles },
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||||
&window);
|
&window);
|
||||||
if (!fName.empty())
|
if (!fName.empty())
|
||||||
|
@ -348,7 +348,7 @@ void KeyConfigPrefs::OnImport(wxCommandEvent & WXUNUSED(event))
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
file,
|
file,
|
||||||
wxT(""),
|
wxT(""),
|
||||||
_("XML files (*.xml)|*.xml|All files|*"),
|
{ FileNames::XMLFiles, FileNames::AllFiles },
|
||||||
wxRESIZE_BORDER,
|
wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ void KeyConfigPrefs::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
file,
|
file,
|
||||||
wxT("xml"),
|
wxT("xml"),
|
||||||
_("XML files (*.xml)|*.xml|All files|*"),
|
{ FileNames::XMLFiles, FileNames::AllFiles },
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user