GUI support for Latch

This commit is contained in:
Robin Gareus 2017-07-25 16:10:38 +02:00 committed by Paul Davis
parent 1d587592ca
commit 9e256b044d
6 changed files with 53 additions and 6 deletions

View file

@ -262,6 +262,8 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
sigc::bind (sigc::mem_fun (*this, &GainMeterBase::set_gain_astate), (AutoState) ARDOUR::Write)));
gain_astate_menu.items().push_back (MenuElem (_("Touch"),
sigc::bind (sigc::mem_fun (*this, &GainMeterBase::set_gain_astate), (AutoState) ARDOUR::Touch)));
gain_astate_menu.items().push_back (MenuElem (_("Latch"),
sigc::bind (sigc::mem_fun (*this, &GainMeterBase::set_gain_astate), (AutoState) ARDOUR::Latch)));
connections.push_back (gain_automation_state_button.signal_button_press_event().connect (sigc::mem_fun(*this, &GainMeterBase::gain_automation_state_button_event), false));
connections.push_back (ChangeGainAutomationState.connect (sigc::mem_fun(*this, &GainMeterBase::set_gain_astate)));
@ -782,16 +784,19 @@ GainMeterBase::_astate_string (AutoState state, bool shrt)
switch (state) {
case ARDOUR::Off:
sstr = (shrt ? "M" : _("M"));
sstr = (shrt ? "M" : S_("Manual|M"));
break;
case Play:
sstr = (shrt ? "P" : _("P"));
sstr = (shrt ? "P" : S_("Play|P"));
break;
case Touch:
sstr = (shrt ? "T" : _("T"));
sstr = (shrt ? "T" : S_("Trim|T"));
break;
case Latch:
sstr = (shrt ? "L" : S_("Latch|L"));
break;
case Write:
sstr = (shrt ? "W" : _("W"));
sstr = (shrt ? "W" : S_("Write|W"));
break;
}