projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86dea93
)
Format boolean parameter values
author
Robin Gareus
<robin@gareus.org>
Wed, 21 Jun 2017 15:09:31 +0000
(17:09 +0200)
committer
Robin Gareus
<robin@gareus.org>
Wed, 21 Jun 2017 16:11:43 +0000
(18:11 +0200)
libs/ardour/ardour/value_as_string.h
patch
|
blob
|
history
diff --git
a/libs/ardour/ardour/value_as_string.h
b/libs/ardour/ardour/value_as_string.h
index 0dd23e298052e0b365ba873a7899211e74d6bdec..2a973f374e1f0d9ca83cd8e898a59bc224a5c940 100644
(file)
--- a/
libs/ardour/ardour/value_as_string.h
+++ b/
libs/ardour/ardour/value_as_string.h
@@
-26,6
+26,8
@@
#include "ardour/dB.h"
#include "ardour/parameter_descriptor.h"
+#include "pbd/i18n.h"
+
namespace ARDOUR {
inline std::string
@@
-45,6
+47,10
@@
value_as_string(const ARDOUR::ParameterDescriptor& desc,
}
}
+ if (desc.toggled) {
+ return v >= 0 ? _("on") : _("off");
+ }
+
// Value is not a scale point, print it normally
if (desc.unit == ARDOUR::ParameterDescriptor::MIDI_NOTE) {
snprintf(buf, sizeof(buf), "%s", ParameterDescriptor::midi_note_name (rint(v)).c_str());