Mercurial > hg > vamp-plugin-pack
changeset 73:b435dbefc67a
Add list of plugins in dialog
author | Chris Cannam |
---|---|
date | Mon, 17 Feb 2020 12:25:29 +0000 |
parents | 9efbf0ee2b8b |
children | a182f7b4b1ea |
files | installer.cpp |
diffstat | 1 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/installer.cpp Fri Feb 14 16:45:23 2020 +0000 +++ b/installer.cpp Mon Feb 17 12:25:29 2020 +0000 @@ -554,10 +554,28 @@ ++selectionRow; - QString text = QObject::tr("<b>%1</b><br><i>%2</i><br><br>%3") + QString text = QObject::tr("<b>%1</b><br><i>%2</i><br><br>%3<br><br>Library contains:<ul>") .arg(info.title) .arg(info.maker) .arg(info.description); + + int n = 0; + bool closed = false; + for (auto title: info.pluginTitles) { + if (n == 10 && info.pluginTitles.size() > 15) { + text += QObject::tr("</ul>"); + text += QObject::tr("... and %n other plugins", "", + info.pluginTitles.size() - n); + closed = true; + break; + } + text += QObject::tr("<li>%1</li>").arg(title); + ++n; + } + + if (!closed) { + text += QObject::tr("</ul>"); + } QObject::connect(expand, &QAbstractButton::clicked, [=]() {