Browse Source

Add tags to Info module context menu.

tags/v2.0.0
Andrew Belt 5 years ago
parent
commit
5c90a71713
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/app/ModuleWidget.cpp

+ 7
- 0
src/app/ModuleWidget.cpp View File

@@ -10,6 +10,7 @@
#include <settings.hpp> #include <settings.hpp>
#include <history.hpp> #include <history.hpp>
#include <string.hpp> #include <string.hpp>
#include <tag.hpp>


#include <osdialog.h> #include <osdialog.h>
#include <thread> #include <thread>
@@ -53,6 +54,12 @@ struct ModuleInfoItem : ui::MenuItem {
versionLabel->text = "v" + model->plugin->version; versionLabel->text = "v" + model->plugin->version;
menu->addChild(versionLabel); menu->addChild(versionLabel);


for (int tagId : model->tags) {
ui::MenuLabel* tagLabel = new ui::MenuLabel;
tagLabel->text = tag::tagAliases[tagId][0];
menu->addChild(tagLabel);
}

if (!model->plugin->author.empty()) { if (!model->plugin->author.empty()) {
if (!model->plugin->authorUrl.empty()) { if (!model->plugin->authorUrl.empty()) {
ModuleUrlItem* authorItem = new ModuleUrlItem; ModuleUrlItem* authorItem = new ModuleUrlItem;


Loading…
Cancel
Save