gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

commit 912d5a9b75eaad44dae17ad70dc6cdb9d5489b84
parent 7fe74a1d08519b73ac37f31514f7b8165f47e89c
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Thu, 15 Aug 2024 01:02:13 +0200

add "Reveal in File Browser" option for datasources

Diffstat:
Mdoc/changelog.txt | 3+++
Msource/jucePluginEditorLib/patchmanager/datasourcetreeitem.cpp | 11+++++++++++
Msource/jucePluginLib/patchdb/db.h | 2++
3 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/doc/changelog.txt b/doc/changelog.txt @@ -4,6 +4,9 @@ Release Notes Framework: +- [Imp] Patch Manager: Added options to reveal a datasource in the default + File Browser of the OS + - [Fix] CLAP: Ranges of discrete parameters were not reported properly, causing automation issues - [Fix] Context menu for text edit fields was twice as large as intended diff --git a/source/jucePluginEditorLib/patchmanager/datasourcetreeitem.cpp b/source/jucePluginEditorLib/patchmanager/datasourcetreeitem.cpp @@ -127,6 +127,17 @@ namespace jucePluginEditorLib::patchManager { getPatchManager().removeDataSource(*m_dataSource); }); + menu.addItem("Reveal in File Browser", [this] + { + if(m_dataSource->type == pluginLib::patchDB::SourceType::LocalStorage) + { + getPatchManager().getLocalStorageFile(*m_dataSource).revealToUser(); + } + else + { + juce::File(m_dataSource->name).revealToUser(); + } + }); } if(m_dataSource->type == pluginLib::patchDB::SourceType::LocalStorage) { diff --git a/source/jucePluginLib/patchdb/db.h b/source/jucePluginLib/patchdb/db.h @@ -141,9 +141,11 @@ namespace pluginLib::patchDB bool saveJson(const DataSourceNodePtr& _ds); bool saveJson(const juce::File& _target, juce::DynamicObject* _src); + public: juce::File getJsonFile(const DataSource& _ds) const; juce::File getLocalStorageFile(const DataSource& _ds) const; + private: bool saveLocalStorage(); void pushError(std::string _string);