| 796 | } |
| 797 | |
| 798 | ui::Menu* createChildMenu() override { |
| 799 | auto it = library::updateInfos.find(slug); |
| 800 | if (it == library::updateInfos.end()) |
| 801 | return NULL; |
| 802 | library::UpdateInfo update = it->second; |
| 803 | |
| 804 | ui::Menu* menu = new ui::Menu; |
| 805 | |
| 806 | if (update.minRackVersion != "") { |
| 807 | menu->addChild(createMenuLabel(string::f(string::translate("MenuBar.library.requiresRack"), update.minRackVersion))); |
| 808 | } |
| 809 | |
| 810 | if (update.changelogUrl != "") { |
| 811 | std::string changelogUrl = update.changelogUrl; |
| 812 | menu->addChild(createMenuItem(string::translate("MenuBar.library.changelog"), "", [=]() { |
| 813 | system::openBrowser(changelogUrl); |
| 814 | })); |
| 815 | } |
| 816 | |
| 817 | if (menu->children.empty()) { |
| 818 | delete menu; |
| 819 | return NULL; |
| 820 | } |
| 821 | return menu; |
| 822 | } |
| 823 | |
| 824 | void step() override { |
| 825 | disabled = false; |
nothing calls this directly
no test coverage detected