diff --git a/gtk2_ardour/cuebox_ui.cc b/gtk2_ardour/cuebox_ui.cc index 8968f8536d..b51d250766 100644 --- a/gtk2_ardour/cuebox_ui.cc +++ b/gtk2_ardour/cuebox_ui.cc @@ -277,6 +277,8 @@ CueBoxUI::context_menu (uint64_t idx) fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::Again), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::Again, idx))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::PrevTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::PrevTrigger, idx))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::NextTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::NextTrigger, idx))); + fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::ReverseTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::ReverseTrigger, idx))); + fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::ForwardTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::ForwardTrigger, idx))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::AnyTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::AnyTrigger, idx))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::OtherTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::OtherTrigger, idx))); diff --git a/gtk2_ardour/slot_properties_box.cc b/gtk2_ardour/slot_properties_box.cc index 7ec8e42500..405cde25c6 100644 --- a/gtk2_ardour/slot_properties_box.cc +++ b/gtk2_ardour/slot_properties_box.cc @@ -144,6 +144,8 @@ SlotPropertyTable::SlotPropertyTable () _follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::Again), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::Again, 0))); _follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::PrevTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::PrevTrigger, 0))); _follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::NextTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::NextTrigger, 0))); + _follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::ReverseTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::ReverseTrigger, 0))); + _follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::ForwardTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::ForwardTrigger, 0))); _follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::AnyTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::AnyTrigger, 0))); _follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::OtherTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::OtherTrigger, 0))); _follow_left.set_sizing_text (longest_follow); @@ -154,6 +156,8 @@ SlotPropertyTable::SlotPropertyTable () _follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::Again), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::Again, 1))); _follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::PrevTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::PrevTrigger, 1))); _follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::NextTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::NextTrigger, 1))); + _follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::ReverseTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::ReverseTrigger, 1))); + _follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::ForwardTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::ForwardTrigger, 1))); _follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::AnyTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::AnyTrigger, 1))); _follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::OtherTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::OtherTrigger, 1))); _follow_right.set_sizing_text (longest_follow); diff --git a/gtk2_ardour/trigger_master.cc b/gtk2_ardour/trigger_master.cc index 8cd222231a..b861aa949a 100644 --- a/gtk2_ardour/trigger_master.cc +++ b/gtk2_ardour/trigger_master.cc @@ -354,6 +354,8 @@ TriggerMaster::context_menu () fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::Again), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::Again))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::PrevTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::PrevTrigger))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::NextTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::NextTrigger))); + fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::ForwardTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::ForwardTrigger))); + fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::ReverseTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::ReverseTrigger))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::AnyTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::AnyTrigger))); fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::OtherTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::OtherTrigger))); diff --git a/gtk2_ardour/trigger_ui.cc b/gtk2_ardour/trigger_ui.cc index 2dd4e73cdc..589b93a695 100644 --- a/gtk2_ardour/trigger_ui.cc +++ b/gtk2_ardour/trigger_ui.cc @@ -78,6 +78,8 @@ TriggerUI::TriggerUI () follow_strings.push_back (follow_action_to_string (Trigger::QueuedTrigger)); follow_strings.push_back (follow_action_to_string (Trigger::NextTrigger)); follow_strings.push_back (follow_action_to_string (Trigger::PrevTrigger)); + follow_strings.push_back (follow_action_to_string (Trigger::ForwardTrigger)); + follow_strings.push_back (follow_action_to_string (Trigger::ReverseTrigger)); follow_strings.push_back (follow_action_to_string (Trigger::FirstTrigger)); follow_strings.push_back (follow_action_to_string (Trigger::LastTrigger)); follow_strings.push_back (follow_action_to_string (Trigger::AnyTrigger)); @@ -577,6 +579,16 @@ TriggerUI::follow_context_menu () if (trigger ()->follow_action (0) == Trigger::NextTrigger) { dynamic_cast (&fitems.back ())->set_active (true); } + + fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::ForwardTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::ForwardTrigger))); + if (trigger ()->follow_action (0) == Trigger::ForwardTrigger) { + dynamic_cast (&fitems.back ())->set_active (true); + } + fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::ReverseTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::ReverseTrigger))); + if (trigger ()->follow_action (0) == Trigger::ReverseTrigger) { + dynamic_cast (&fitems.back ())->set_active (true); + } + #if 0 fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::FirstTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::FirstTrigger))); if (trigger ()->follow_action (0) == Trigger::FirstTrigger) { @@ -738,6 +750,10 @@ TriggerUI::follow_action_to_string (Trigger::FollowAction fa) return _("Next"); case Trigger::PrevTrigger: return _("Prev"); + case Trigger::ForwardTrigger: + return _("Forward"); + case Trigger::ReverseTrigger: + return _("Reverse"); case Trigger::FirstTrigger: return _("First"); case Trigger::LastTrigger: diff --git a/gtk2_ardour/triggerbox_ui.cc b/gtk2_ardour/triggerbox_ui.cc index fc8be3efc3..42666d9e11 100644 --- a/gtk2_ardour/triggerbox_ui.cc +++ b/gtk2_ardour/triggerbox_ui.cc @@ -217,6 +217,21 @@ TriggerEntry::draw_follow_icon (Cairo::RefPtr context, Trigger:: context->arc (size / 2, 5 * scale, 1.5 * scale, 0, 2 * M_PI); // arrow head context->fill (); break; + /* XXX Ben to add new icons for next two */ + case Trigger::ForwardTrigger: + context->move_to (size / 2, 3 * scale); + context->line_to (size / 2, size - 5 * scale); + context->stroke (); + context->arc (size / 2, size - 5 * scale, 1.5 * scale, 0, 2 * M_PI); // arrow head + context->fill (); + break; + case Trigger::ReverseTrigger: + context->move_to (size / 2, 5 * scale); + context->line_to (size / 2, size - 3 * scale); + context->stroke (); + context->arc (size / 2, 5 * scale, 1.5 * scale, 0, 2 * M_PI); // arrow head + context->fill (); + break; case Trigger::QueuedTrigger: { Glib::RefPtr layout = Pango::Layout::create (context); layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());