Add editor action to open SFZ dir
This commit is contained in:
parent
bd13260046
commit
2dbfbf3148
1 changed files with 12 additions and 0 deletions
|
|
@ -58,6 +58,7 @@ struct Editor::Impl : EditorController::Receiver, IControlListener {
|
|||
enum {
|
||||
kTagLoadSfzFile,
|
||||
kTagEditSfzFile,
|
||||
kTagOpenSfzFolder,
|
||||
kTagPreviousSfzFile,
|
||||
kTagNextSfzFile,
|
||||
kTagFileOperations,
|
||||
|
|
@ -848,6 +849,7 @@ void Editor::Impl::createFrameContents()
|
|||
if (SActionMenu* menu = fileOperationsMenu_) {
|
||||
menu->addEntry("Load file", kTagLoadSfzFile);
|
||||
menu->addEntry("Edit file", kTagEditSfzFile);
|
||||
menu->addEntry("Open SFZ folder", kTagOpenSfzFolder);
|
||||
}
|
||||
|
||||
if (SPiano* piano = piano_) {
|
||||
|
|
@ -1320,6 +1322,16 @@ void Editor::Impl::valueChanged(CControl* ctl)
|
|||
openFileInExternalEditor(currentSfzFile_.c_str());
|
||||
break;
|
||||
|
||||
case kTagOpenSfzFolder:
|
||||
if (value != 1)
|
||||
break;
|
||||
|
||||
if (!userFilesDir_.empty())
|
||||
openDirectoryInExplorer(userFilesDir_.c_str());
|
||||
else if (!fallbackFilesDir_.empty())
|
||||
openDirectoryInExplorer(fallbackFilesDir_.c_str());
|
||||
break;
|
||||
|
||||
case kTagPreviousSfzFile:
|
||||
if (value != 1)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue