mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
a start at custom MIDI learn for trigger slots (GUI edition)
This commit is contained in:
parent
730064277d
commit
75a990da8c
2 changed files with 22 additions and 1 deletions
|
|
@ -437,13 +437,31 @@ TriggerUI::context_menu ()
|
|||
items.push_back (MenuElem (_("Load..."), sigc::bind(sigc::mem_fun (*this, (&TriggerUI::choose_sample)), true)));
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Color..."), sigc::mem_fun (*this, &TriggerUI::choose_color)));
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Clear"), sigc::mem_fun (*this, &TriggerUI::clear_trigger)));
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("MIDI Learn"), sigc::mem_fun (*this, &TriggerUI::trigger_midi_learn)));
|
||||
items.push_back (MenuElem (_("MIDI un-Learn"), sigc::mem_fun (*this, &TriggerUI::trigger_midi_unlearn)));
|
||||
|
||||
|
||||
_context_menu->popup (3, gtk_get_current_event_time ());
|
||||
}
|
||||
|
||||
void
|
||||
TriggerUI::trigger_midi_learn ()
|
||||
{
|
||||
if (!trigger()) {
|
||||
return;
|
||||
}
|
||||
|
||||
tref.box->begin_midi_learn (trigger()->index());
|
||||
}
|
||||
|
||||
void
|
||||
TriggerUI::trigger_midi_unlearn ()
|
||||
{
|
||||
tref.box->midi_unlearn (trigger()->index());
|
||||
}
|
||||
|
||||
void
|
||||
TriggerUI::launch_context_menu ()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue