mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
trigger_ui: implement direct-Jump actions for the slot properties (left&right FA)
This commit is contained in:
parent
a23f3aec50
commit
f62c4908e0
1 changed files with 17 additions and 2 deletions
|
|
@ -142,7 +142,15 @@ SlotPropertyTable::SlotPropertyTable ()
|
|||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::Again)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::Again), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::ReverseTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::ReverseTrigger), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::ForwardTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::ForwardTrigger), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::JumpTrigger), 0)));
|
||||
Menu* jump_menu = manage (new Menu);
|
||||
MenuList& jitems = jump_menu->items ();
|
||||
for (int i = 0; i < default_triggers_per_box; i++) {
|
||||
FollowAction jump_fa = (FollowAction::JumpTrigger);
|
||||
jump_fa.targets.set(i);
|
||||
jitems.push_back (MenuElem (string_compose ("%1", (char)('A' + i)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), jump_fa, 0)));
|
||||
}
|
||||
//jitems.push_back (MenuElem ("Combo...", sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::JumpTrigger), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (_("Jump..."), *jump_menu));
|
||||
_follow_left.set_sizing_text (longest_follow);
|
||||
|
||||
_follow_right.set_name("FollowAction");
|
||||
|
|
@ -151,7 +159,14 @@ SlotPropertyTable::SlotPropertyTable ()
|
|||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::Again)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::Again), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::ReverseTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::ReverseTrigger), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::ForwardTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::ForwardTrigger), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::JumpTrigger), 1)));
|
||||
Menu* jump_menu_1 = manage (new Menu);
|
||||
MenuList& jitems_1 = jump_menu_1->items ();
|
||||
for (int i = 0; i < default_triggers_per_box; i++) {
|
||||
FollowAction jump_fa = (FollowAction::JumpTrigger);
|
||||
jump_fa.targets.set(i);
|
||||
jitems_1.push_back (MenuElem (string_compose ("%1", (char)('A' + i)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), jump_fa, 1)));
|
||||
}
|
||||
_follow_right.AddMenuElem (MenuElem (_("Jump..."), *jump_menu_1));
|
||||
_follow_right.set_sizing_text (longest_follow);
|
||||
|
||||
_launch_style_button.set_name("FollowAction");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue