Skip to content

Commit

Permalink
NAM_PICK_DIRECTORY for all versions
Browse files Browse the repository at this point in the history
  • Loading branch information
olilarkin committed Dec 3, 2023
1 parent 19ed7db commit a175300
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions NeuralAmpModeler/NeuralAmpModeler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,8 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
pGraphics->AttachControl(new IVLabelControl(titleArea, "NEURAL AMP MODELER", titleStyle));
pGraphics->AttachControl(new ISVGControl(modelIconArea, modelIconSVG));

#ifdef NAM_PICK_DIRECTORY
const std::string defaultNamFileString = "Select model directory...";
const std::string defaultIRString = "Select IR directory...";
#else
const std::string defaultNamFileString = "Select model...";
const std::string defaultIRString = "Select IR...";
#endif
pGraphics->AttachControl(new NAMFileBrowserControl(modelArea, mModelFileManager, kMsgTagClearModel, defaultNamFileString.c_str(), style, fileSVG, crossSVG,
leftArrowSVG, rightArrowSVG, fileBackgroundBitmap),
kCtrlTagModelFileBrowser);
Expand Down
4 changes: 0 additions & 4 deletions NeuralAmpModeler/NeuralAmpModelerControls.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,7 @@ class NAMFileBrowserControl : public IContainerBase
mFileManager.OnPicked(fileName, path, true);
};

#ifdef NAM_PICK_DIRECTORY
pCaller->GetUI()->PromptForDirectory(path, callbackFunc);
#else
pCaller->GetUI()->PromptForFile(fileName, path, EFileAction::Open, mFileManager.GetExtension(), callbackFunc);
#endif
};

auto clearFileFunc = [&](IControl* pCaller) {
Expand Down
8 changes: 0 additions & 8 deletions NeuralAmpModeler/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,3 @@
#define METERBACKGROUND_FN "MeterBackground.png"
#define METERBACKGROUND2X_FN "[email protected]"
#define METERBACKGROUND3X_FN "[email protected]"

// Issue 291
// On the macOS standalone, we might not have permissions to traverse the file directory, so we have the app ask the
// user to pick a directory instead of the file in the directory.
// Everyone else is fine though.
#if defined(APP_API) && defined(__APPLE__)
#define NAM_PICK_DIRECTORY
#endif

0 comments on commit a175300

Please sign in to comment.