From a1836e7c570f5845654f6f2e685c65b38db2f03e Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 21 Oct 2017 05:47:42 -0400 Subject: [PATCH] Added version metadata to plugin --- CHANGELOG.md | 3 +++ include/plugin.hpp | 1 + src/app.cpp | 2 +- src/app/RackWidget.cpp | 6 ++++++ src/gui.cpp | 5 ++++- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fed6cc14..ba67aa5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ Tip: Use `git checkout v0.4.0` for example to check out any previous version men ### dev +- Audible Instruments + - Added Low CPU mode to Braids for draft-quality rendering + ### v0.4.0 - Cables can now stack on output ports diff --git a/include/plugin.hpp b/include/plugin.hpp index da0c637c..19b7693e 100644 --- a/include/plugin.hpp +++ b/include/plugin.hpp @@ -26,6 +26,7 @@ struct Plugin { /** Optional metadata for the Add Module context menu */ std::string homepageUrl; std::string manualUrl; + std::string version; }; struct Model { diff --git a/src/app.cpp b/src/app.cpp index 188b2471..ff97af8a 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -8,7 +8,7 @@ std::string gApplicationVersion = #ifdef VERSION TOSTRING(VERSION); #else - "dev"; + ""; #endif std::string gApiHost = "http://api.vcvrack.com"; diff --git a/src/app/RackWidget.cpp b/src/app/RackWidget.cpp index 74143770..87de4129 100644 --- a/src/app/RackWidget.cpp +++ b/src/app/RackWidget.cpp @@ -434,6 +434,12 @@ struct AddPluginMenuItem : MenuItem { menu->pushChild(item); } + if (!plugin->version.empty()) { + MenuLabel *item = new MenuLabel(); + item->text = "Version: v" + plugin->version; + menu->pushChild(item); + } + return menu; } }; diff --git a/src/gui.cpp b/src/gui.cpp index df52c212..eb789cef 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -324,7 +324,10 @@ void guiRun() { mouseButtonStickyPop(); // Set window title - std::string title = gApplicationName + " " + gApplicationVersion; + std::string title = gApplicationName; + if (!gApplicationVersion.empty()) { + title += " v" + gApplicationVersion; + } if (!gRackWidget->lastPath.empty()) { title += " - "; title += extractFilename(gRackWidget->lastPath);