mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 08:59:28 +02:00
Replace wxFileDialog with FileDialogWrapper in two places
This commit is contained in:
parent
c44ae15a4d
commit
3542eb4ca0
@ -663,6 +663,15 @@ bool Effect::CanExportPresets()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const FileNames::FileTypes &PresetTypes()
|
||||||
|
{
|
||||||
|
static const FileNames::FileTypes result {
|
||||||
|
{ XO("Presets"), { wxT("txt") }, true },
|
||||||
|
FileNames::AllFiles
|
||||||
|
};
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
void Effect::ExportPresets()
|
void Effect::ExportPresets()
|
||||||
{
|
{
|
||||||
wxString params;
|
wxString params;
|
||||||
@ -672,11 +681,11 @@ void Effect::ExportPresets()
|
|||||||
|
|
||||||
auto path = FileNames::DefaultToDocumentsFolder(wxT("Presets/Path"));
|
auto path = FileNames::DefaultToDocumentsFolder(wxT("Presets/Path"));
|
||||||
|
|
||||||
wxFileDialog dlog(NULL,
|
FileDialogWrapper dlog(nullptr,
|
||||||
_("Export Effect Parameters"),
|
XO("Export Effect Parameters"),
|
||||||
path.GetFullPath(),
|
path.GetFullPath(),
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
_("Presets (*.txt)|*.txt|All files|*"),
|
PresetTypes(),
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER);
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER);
|
||||||
|
|
||||||
if (dlog.ShowModal() != wxID_OK) {
|
if (dlog.ShowModal() != wxID_OK) {
|
||||||
@ -721,11 +730,11 @@ void Effect::ImportPresets()
|
|||||||
|
|
||||||
auto path = FileNames::DefaultToDocumentsFolder(wxT("Presets/Path"));
|
auto path = FileNames::DefaultToDocumentsFolder(wxT("Presets/Path"));
|
||||||
|
|
||||||
wxFileDialog dlog(NULL,
|
FileDialogWrapper dlog(nullptr,
|
||||||
_("Import Effect Parameters"),
|
XO("Import Effect Parameters"),
|
||||||
path.GetPath(),
|
path.GetPath(),
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
_("Presets (*.txt)|*.txt|All files|*"),
|
PresetTypes(),
|
||||||
wxFD_OPEN | wxRESIZE_BORDER);
|
wxFD_OPEN | wxRESIZE_BORDER);
|
||||||
|
|
||||||
if (dlog.ShowModal() != wxID_OK) {
|
if (dlog.ShowModal() != wxID_OK) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user