diff --git a/src/FFmpeg.cpp b/src/FFmpeg.cpp index 8fa2a8cb6..4014b3ea6 100644 --- a/src/FFmpeg.cpp +++ b/src/FFmpeg.cpp @@ -519,7 +519,7 @@ public: "Where would I find the file '%s'?" instead if you want. */ question.Printf(_("Where is '%s'?"), mName.c_str()); - wxString path = FileNames::SelectFile(FileNames::Operation::None, + wxString path = FileNames::SelectFile(FileNames::Operation::_None, question, mLibPath.GetPath(), mLibPath.GetName(), diff --git a/src/FileNames.cpp b/src/FileNames.cpp index e8642845a..6743b3739 100644 --- a/src/FileNames.cpp +++ b/src/FileNames.cpp @@ -347,7 +347,7 @@ namespace { key = wxT("/DefaultOpenPath"); break; case FileNames::Operation::Export: key = wxT("/DefaultExportPath"); break; - case FileNames::Operation::None: + case FileNames::Operation::_None: default: break; } diff --git a/src/FileNames.h b/src/FileNames.h index d54409afc..4d290b6ef 100644 --- a/src/FileNames.h +++ b/src/FileNames.h @@ -72,7 +72,8 @@ public: // If not None, determines a preference key (for the default path string) to // be read and updated enum class Operation { - None, + // _ on None to defeat some macro that is expanding this. + _None, Open, Export }; diff --git a/src/Internat.cpp b/src/Internat.cpp index 51b7166bd..5d91b48bf 100644 --- a/src/Internat.cpp +++ b/src/Internat.cpp @@ -30,6 +30,7 @@ and on Mac OS X for the filesystem. #include "Internat.h" #include "Experimental.h" +#include "FileNames.h" // in order for the static member variables to exist, they must appear here // (_outside_) the class definition, in order to be allocated some storage. @@ -245,7 +246,7 @@ char *Internat::VerifyFilename(const wxString &s, bool input) wxMessageBox(_("The specified filename could not be converted due to Unicode character use.")); ext = ff.GetExt(); - name = FileNames::SelectFile(FileNames::Operation::None, + name = FileNames::SelectFile(FileNames::Operation::_None, _("Specify New Filename:"), wxEmptyString, name, diff --git a/src/Tags.cpp b/src/Tags.cpp index d98e1b92a..5cd803f41 100644 --- a/src/Tags.cpp +++ b/src/Tags.cpp @@ -1152,7 +1152,7 @@ void TagsEditor::OnLoad(wxCommandEvent & WXUNUSED(event)) wxString fn; // Ask the user for the real name - fn = FileNames::SelectFile(FileNames::Operation::None, + fn = FileNames::SelectFile(FileNames::Operation::_None, _("Load Metadata As:"), FileNames::DataDir(), wxT("Tags.xml"), @@ -1207,7 +1207,7 @@ void TagsEditor::OnSave(wxCommandEvent & WXUNUSED(event)) TransferDataFromWindow(); // Ask the user for the real name - fn = FileNames::SelectFile(FileNames::Operation::None, + fn = FileNames::SelectFile(FileNames::Operation::_None, _("Save Metadata As:"), FileNames::DataDir(), wxT("Tags.xml"), diff --git a/src/effects/VST/VSTEffect.cpp b/src/effects/VST/VSTEffect.cpp index 18337af24..9ae46a844 100644 --- a/src/effects/VST/VSTEffect.cpp +++ b/src/effects/VST/VSTEffect.cpp @@ -1798,7 +1798,7 @@ void VSTEffect::ExportPresets() // // Passing a valid parent will cause some effects dialogs to malfunction // upon returning from the FileNames::SelectFile(). - path = FileNames::SelectFile(FileNames::Operation::None, + path = FileNames::SelectFile(FileNames::Operation::_None, _("Save VST Preset As:"), FileNames::DataDir(), wxEmptyString, @@ -1850,7 +1850,7 @@ void VSTEffect::ImportPresets() wxString path; // Ask the user for the real name - path = FileNames::SelectFile(FileNames::Operation::None, + path = FileNames::SelectFile(FileNames::Operation::_None, _("Load VST Preset:"), FileNames::DataDir(), wxEmptyString, diff --git a/src/export/ExportCL.cpp b/src/export/ExportCL.cpp index f05dfd4bb..5fe7346c3 100644 --- a/src/export/ExportCL.cpp +++ b/src/export/ExportCL.cpp @@ -24,7 +24,7 @@ #include #include #include -#include "FileNames.h" +#include "../FileNames.h" #include "Export.h" #include "../Mix.h" diff --git a/src/export/ExportMP3.cpp b/src/export/ExportMP3.cpp index be25a5051..897860e42 100644 --- a/src/export/ExportMP3.cpp +++ b/src/export/ExportMP3.cpp @@ -660,7 +660,7 @@ public: * "Where would I find the file %s" instead if you want. */ question.Printf(_("Where is %s?"), mName.c_str()); - wxString path = FileNames::SelectFile(FileNames::Operation::None, + wxString path = FileNames::SelectFile(FileNames::Operation::_None, question, mLibPath.GetPath(), mLibPath.GetName(), diff --git a/src/prefs/KeyConfigPrefs.cpp b/src/prefs/KeyConfigPrefs.cpp index 035e91bba..b15c1c5a5 100644 --- a/src/prefs/KeyConfigPrefs.cpp +++ b/src/prefs/KeyConfigPrefs.cpp @@ -39,7 +39,7 @@ KeyConfigPrefs and MousePrefs use. #include "../Internat.h" #include "../ShuttleGui.h" -#include "FileNames.h" +#include "../FileNames.h" #if defined(EXPERIMENTAL_KEY_VIEW)