From 3b9204c684291a61a428b0ab8c360fe2662a090e Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 10 Mar 2018 21:04:30 -0500 Subject: [PATCH] Change "manufacturer" to "author" --- include/plugin.hpp | 16 +++++---- include/rack.hpp | 4 +-- src/app/ModuleBrowser.cpp | 70 +++++++++++++++++++-------------------- src/app/ModuleWidget.cpp | 2 +- src/plugin.cpp | 6 ++-- 5 files changed, 50 insertions(+), 48 deletions(-) diff --git a/include/plugin.hpp b/include/plugin.hpp index 3b8a6f0e..6fa9662a 100644 --- a/include/plugin.hpp +++ b/include/plugin.hpp @@ -43,15 +43,17 @@ struct Plugin { struct Model { Plugin *plugin = NULL; - /** An identifier for the model, e.g. "VCO". Used for saving patches. The slug, manufacturerSlug pair must be unique. */ + /** An identifier for the model, e.g. "VCO". Used for saving patches. + The model slug must be unique in your plugin, but it doesn't need to be unique among different plugins. + */ std::string slug; /** Human readable name for your model, e.g. "Voltage Controlled Oscillator" */ std::string name; - /** The name of the manufacturer group of the module. - This might be different than the plugin slug. For example, if you create multiple plugins but want them to be branded similarly, you may use the same manufacturer name in multiple plugins. - You may even have multiple manufacturers in one plugin, although this would be unusual. + /** The author name of the module. + This might be different than the plugin slug. For example, if you create multiple plugins but want them to be branded similarly, you may use the same author in multiple plugins. + You may even have multiple authors in one plugin, although this property will be moved to Plugin for Rack 1.0. */ - std::string manufacturer; + std::string author; /** List of tags representing the function(s) of the module (optional) */ std::list tags; @@ -65,7 +67,7 @@ struct Model { /** Create Model subclass which constructs a specific Module and ModuleWidget subclass */ template - static Model *create(std::string manufacturer, std::string slug, std::string name, Tags... tags) { + static Model *create(std::string author, std::string slug, std::string name, Tags... tags) { struct TModel : Model { Module *createModule() override { TModule *module = new TModule(); @@ -84,7 +86,7 @@ struct Model { } }; TModel *o = new TModel(); - o->manufacturer = manufacturer; + o->author = author; o->slug = slug; o->name = name; o->tags = {tags...}; diff --git a/include/rack.hpp b/include/rack.hpp index 59d6ce95..16c4f317 100644 --- a/include/rack.hpp +++ b/include/rack.hpp @@ -20,7 +20,7 @@ namespace rack { /** Deprecated, use Model::create(...) instead */ template -DEPRECATED Model *createModel(std::string manufacturer, std::string slug, std::string name, Tags... tags) { +DEPRECATED Model *createModel(std::string author, std::string slug, std::string name, Tags... tags) { struct TModel : Model { ModuleWidget *createModuleWidget() override { ModuleWidget *moduleWidget = new TModuleWidget(); @@ -29,7 +29,7 @@ DEPRECATED Model *createModel(std::string manufacturer, std::string slug, std::s } }; Model *model = new TModel(); - model->manufacturer = manufacturer; + model->author = author; model->slug = slug; model->name = name; model->tags = {tags...}; diff --git a/src/app/ModuleBrowser.cpp b/src/app/ModuleBrowser.cpp index 677dae48..938d1704 100644 --- a/src/app/ModuleBrowser.cpp +++ b/src/app/ModuleBrowser.cpp @@ -12,7 +12,7 @@ namespace rack { static std::set sFavoriteModels; -static std::string sManufacturerFilter; +static std::string sAuthorFilter; static ModelTag sTagFilter = NO_TAG; @@ -29,7 +29,7 @@ static bool isModelMatch(Model *model, std::string search) { std::string s; s += model->plugin->slug; s += " "; - s += model->manufacturer; + s += model->author; s += " "; s += model->name; s += " "; @@ -98,7 +98,7 @@ struct BrowserListItem : OpaqueWidget { struct ModelItem : BrowserListItem { Model *model; - Label *manufacturerLabel; + Label *authorLabel; void setModel(Model *model) { clearChildren(); @@ -109,10 +109,10 @@ struct ModelItem : BrowserListItem { nameLabel->text = model->name; addChild(nameLabel); - manufacturerLabel = Widget::create