diff --git a/gtk2_ardour/cuebox_ui.cc b/gtk2_ardour/cuebox_ui.cc index 2842f5b480..8a4797426d 100644 --- a/gtk2_ardour/cuebox_ui.cc +++ b/gtk2_ardour/cuebox_ui.cc @@ -253,6 +253,7 @@ CueBoxUI::context_menu (uint64_t idx) fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::ForwardTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::ForwardTrigger), idx))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::AnyTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::AnyTrigger), idx))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::OtherTrigger), idx))); + fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::JumpTrigger), idx))); Menu* launch_menu = manage (new Menu); MenuList& litems = launch_menu->items (); diff --git a/gtk2_ardour/slot_properties_box.cc b/gtk2_ardour/slot_properties_box.cc index 997bfbc089..a1e788deb6 100644 --- a/gtk2_ardour/slot_properties_box.cc +++ b/gtk2_ardour/slot_properties_box.cc @@ -146,6 +146,7 @@ SlotPropertyTable::SlotPropertyTable () _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::AnyTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::AnyTrigger), 0))); _follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::OtherTrigger), 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))); _follow_left.set_sizing_text (longest_follow); _follow_right.set_name("FollowAction"); @@ -158,6 +159,7 @@ SlotPropertyTable::SlotPropertyTable () _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::AnyTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::AnyTrigger), 1))); _follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::OtherTrigger), 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))); _follow_right.set_sizing_text (longest_follow); _launch_style_button.set_name("FollowAction"); diff --git a/gtk2_ardour/trigger_master.cc b/gtk2_ardour/trigger_master.cc index 4d51c6b166..afbc5f1ec2 100644 --- a/gtk2_ardour/trigger_master.cc +++ b/gtk2_ardour/trigger_master.cc @@ -350,6 +350,7 @@ TriggerMaster::context_menu () fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::ReverseTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::ReverseTrigger)))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::AnyTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::AnyTrigger)))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::OtherTrigger)))); + fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::JumpTrigger)))); Menu* launch_menu = manage (new Menu); MenuList& litems = launch_menu->items (); @@ -731,6 +732,8 @@ CueMaster::context_menu () fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::ReverseTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::ReverseTrigger)))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::AnyTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::AnyTrigger)))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::OtherTrigger)))); + fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::JumpTrigger)))); + Menu* launch_menu = manage (new Menu); MenuList& litems = launch_menu->items (); diff --git a/gtk2_ardour/trigger_ui.cc b/gtk2_ardour/trigger_ui.cc index 05733cb9bf..ad4d52c82f 100644 --- a/gtk2_ardour/trigger_ui.cc +++ b/gtk2_ardour/trigger_ui.cc @@ -88,6 +88,7 @@ TriggerUI::TriggerUI () follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::LastTrigger))); follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::AnyTrigger))); follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::OtherTrigger))); + follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::JumpTrigger))); for (std::vector::const_iterator i = follow_strings.begin(); i != follow_strings.end(); ++i) { if (i->length() > longest_follow.length()) { @@ -646,6 +647,11 @@ TriggerUI::follow_context_menu () dynamic_cast (&fitems.back ())->set_active (true); } + fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::JumpTrigger)))); + if (trigger ()->follow_action (0) == FollowAction::JumpTrigger) { + dynamic_cast (&fitems.back ())->set_active (true); + } + _ignore_menu_action = false; items.push_back (MenuElem (_("Follow Action..."), *follow_menu)); @@ -805,6 +811,8 @@ TriggerUI::follow_action_to_string (FollowAction const & fa) return _("Any"); case FollowAction::OtherTrigger: return _("Other"); + case FollowAction::JumpTrigger: + return _("Jump"); } /*NOTREACHED*/ return std::string(); diff --git a/gtk2_ardour/triggerbox_ui.cc b/gtk2_ardour/triggerbox_ui.cc index e373b384bc..e2f3f08193 100644 --- a/gtk2_ardour/triggerbox_ui.cc +++ b/gtk2_ardour/triggerbox_ui.cc @@ -294,6 +294,21 @@ TriggerEntry::draw_follow_icon (Cairo::RefPtr context, FollowAct context->set_matrix (m); } context->set_identity_matrix (); + } break; + /* ben: new shape here ? */ + case FollowAction::JumpTrigger: { + context->set_line_width (1.5 * scale); + set_source_rgba (context, HSV (UIConfiguration::instance ().color ("neutral:midground")).lighter (0.25).color ()); // needs to be brighter to maintain balance + for (int i = 0; i < 6; i++) { + Cairo::Matrix m = context->get_matrix (); + context->translate (size / 2, size / 2); + context->rotate (i * M_PI / 3); + context->move_to (0, 2 * scale); + context->line_to (0, (size / 2) - 4 * scale); + context->stroke (); + context->set_matrix (m); + } + context->set_identity_matrix (); } break; case FollowAction::None: default: