From 91046b686d90d8deae539e72a1ee66589af34ed7 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Thu, 1 Mar 2018 08:59:48 -0600 Subject: Plugin-Tag improvements: Initialize LADSPA tags. Explicitly define behavior of tags provided by plugin, factory, or user. Store the plugin name in the tag-file, for easier user-submissions and bulk editing. --- libs/ardour/ardour/plugin_manager.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'libs/ardour/ardour/plugin_manager.h') diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h index f079e4b812..f9b6feb737 100644 --- a/libs/ardour/ardour/plugin_manager.h +++ b/libs/ardour/ardour/plugin_manager.h @@ -85,8 +85,14 @@ public: void load_tags (); void save_tags (); - void set_tags (ARDOUR::PluginType type, std::string unique_id, std::string tags, bool factory, bool force = false); - void reset_tags (PluginInfoPtr const&); + enum TagType { + FromPlug, //tag info is being set from plugin metadata + FromFactoryFile, // ... from the factory metadata file + FromUserFile, // ... from the user's config data + FromGui // ... from the UI, in realtime: will emit a signal so ui can show "sanitized" string as it is generated + }; + void set_tags (ARDOUR::PluginType type, std::string unique_id, std::string tags, std::string name, TagType tagtype); + void reset_tags (PluginInfoPtr const&, TagType); std::string get_tags_as_string (PluginInfoPtr const&) const; std::vector get_tags (PluginInfoPtr const&) const; @@ -112,10 +118,11 @@ private: ARDOUR::PluginType type; std::string unique_id; std::string tags; - bool user_set; + std::string name; + TagType tagtype; - PluginTag (ARDOUR::PluginType t, std::string id, std::string s, bool user_set) - : type (t), unique_id (id), tags (s), user_set (user_set) {} + PluginTag (ARDOUR::PluginType t, std::string id, std::string tag, std::string n, TagType tt) + : type (t), unique_id (id), tags (tag), name(n), tagtype (tt) {} bool operator== (PluginTag const& other) const { return other.type == type && other.unique_id == unique_id; -- cgit v1.2.3