Skip to content

Commit

Permalink
Factory Tuning Library option properly reveals folder now (#4912)
Browse files Browse the repository at this point in the history
Also renamed tuning-library folder to tuning_library for consistency,
and updated all the places in the codebase that referred to the old name.

Also update .clang-format file for clf version 12
  • Loading branch information
mkruselj authored Aug 25, 2021
1 parent edb4043 commit 46ca23b
Show file tree
Hide file tree
Showing 203 changed files with 47 additions and 9 deletions.
42 changes: 40 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,53 @@ Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 4
AlignAfterOpenBracket: Align
BreakBeforeBraces: Allman
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
ColumnLimit: 100
SortIncludes: false
---
Language: ObjC
BasedOnStyle: LLVM
IndentWidth: 4
AlignAfterOpenBracket: Align
BreakBeforeBraces: Allman
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
ColumnLimit: 100
SortIncludes: false
---
Expand Down
2 changes: 1 addition & 1 deletion scripts/installer_win/surge-x86.iss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ UninstallFilesDir={commonappdata}\Surge XT\uninstall\x86\

[InstallDelete]
Type: filesandordirs; Name: "{commoncf32}\VST3\Surge Synth Team\Surge XT Effects.vst3"
;; clean up factory data folder, except tuning-library folder (users might link to their own custom tunings into this folder)
;; clean up factory data folder, except tuning_library folder (users might link to their own custom tunings into this folder)
Type: filesandordirs; Name: "{commonappdata}\Surge XT\modulator_presets"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\patches_3rdparty"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\patches_factory"
Expand Down
2 changes: 1 addition & 1 deletion scripts/installer_win/surge.iss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ UninstallFilesDir={commonappdata}\Surge XT\uninstall

[InstallDelete]
Type: filesandordirs; Name: "{commoncf64}\VST3\Surge Synth Team\Surge XT Effects.vst3"
;; clean up factory data folder, except tuning-library folder (users might link to their own custom tunings into this folder)
;; clean up factory data folder, except tuning_library folder (users might link to their own custom tunings into this folder)
Type: filesandordirs; Name: "{commonappdata}\Surge XT\modulator_presets"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\patches_3rdparty"
Type: filesandordirs; Name: "{commonappdata}\Surge XT\patches_factory"
Expand Down
10 changes: 5 additions & 5 deletions src/gui/SurgeGUIEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2256,7 +2256,7 @@ juce::PopupMenu SurgeGUIEditor::makeTuningMenu(const juce::Point<int> &where, bo
};

auto scl_path =
Surge::Storage::appendDirectory(this->synth->storage.datapath, "tuning-library", "SCL");
Surge::Storage::appendDirectory(this->synth->storage.datapath, "tuning_library", "SCL");

scl_path = Surge::Storage::getUserDefaultValue(&(this->synth->storage),
Surge::Storage::LastSCLPath, scl_path);
Expand Down Expand Up @@ -2310,7 +2310,7 @@ juce::PopupMenu SurgeGUIEditor::makeTuningMenu(const juce::Point<int> &where, bo
};

auto kbm_path = Surge::Storage::appendDirectory(this->synth->storage.datapath,
"tuning-library", "KBM Concert Pitch");
"tuning_library", "KBM Concert Pitch");

kbm_path = Surge::Storage::getUserDefaultValue(&(this->synth->storage),
Surge::Storage::LastKBMPath, kbm_path);
Expand Down Expand Up @@ -2443,10 +2443,10 @@ juce::PopupMenu SurgeGUIEditor::makeTuningMenu(const juce::Point<int> &where, bo
[this]() { showHTML(this->tuningToHtml()); });

tuningSubMenu.addItem(Surge::GUI::toOSCaseForMenu("Factory Tuning Library..."), [this]() {
auto dpath =
Surge::Storage::appendDirectory(this->synth->storage.datapath, "tuning-library");
auto path =
Surge::Storage::appendDirectory(this->synth->storage.datapath, "tuning_library");

juce::URL(juce::File(dpath)).launchInDefaultBrowser();
Surge::GUI::openFileOrFolder(path);
});

return tuningSubMenu;
Expand Down

0 comments on commit 46ca23b

Please sign in to comment.