summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-10-22 15:50:13 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-10-22 15:50:13 +0200
commit1b4ae873729696d9338a1ec36496e94b8139a5a7 (patch)
tree11b100f9f7a2a97ab43f1a58f4db64c405610dc9
parenta3e49c6472b79923c658950271affd8578a1bad8 (diff)
Added instrument channel number to drumkitinfo.
-rw-r--r--plugingui/plugingui.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc
index 6530ea2..19f6dca 100644
--- a/plugingui/plugingui.cc
+++ b/plugingui/plugingui.cc
@@ -245,11 +245,16 @@ void PluginGUI::handleMessage(Message *msg)
metadatatext.append("Channels:\n");
std::vector<std::pair< std::string, std::string> >::iterator channels_it;
+ int count = 1;
for(channels_it = m.channels.begin(); channels_it != m.channels.end();
channels_it++) {
std::string name = channels_it->first;
std::string microphone = channels_it->second;
- metadatatext.append("\t" + name + ": " + microphone + "\n");
+ std::string count_str;
+ count_str << count;
+ metadatatext.append("\t"+ count_str + ". " + name + ": " + microphone + "\n");
+//C++11 only: metadatatext.append("\t"+ std::to_string(count) + ". " + name + ": " + microphone + "\n");
+ count++;
}
metadatatext.append("\n\n");