move default_triggers_per_box into a namespace ; change value for Ardour to 16 (GUI edition)
This commit is contained in:
parent
3c0820e36e
commit
0c2176dd71
|
@ -248,7 +248,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)));
|
||||
Menu* jump_menu = manage (new Menu);
|
||||
MenuList& jitems = jump_menu->items ();
|
||||
for (int i = 0; i < default_triggers_per_box; i++) {
|
||||
for (int i = 0; i < TriggerBox::default_triggers_per_box; i++) {
|
||||
FollowAction jump_fa = (FollowAction::JumpTrigger);
|
||||
jump_fa.targets.set(i);
|
||||
jitems.push_back (MenuElem (cue_marker_name (i), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), jump_fa, idx)));
|
||||
|
@ -399,7 +399,7 @@ CueBoxUI::build ()
|
|||
|
||||
_slots.clear ();
|
||||
|
||||
for (int32_t n = 0; n < default_triggers_per_box; ++n) { // TODO
|
||||
for (int32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) { // TODO
|
||||
CueEntry* te = new CueEntry (this, n);
|
||||
|
||||
_slots.push_back (te);
|
||||
|
@ -416,7 +416,7 @@ CueBoxUI::_size_allocate (ArdourCanvas::Rect const& alloc)
|
|||
const float width = alloc.width ();
|
||||
const float height = alloc.height ();
|
||||
|
||||
const float slot_h = height / default_triggers_per_box; // TODO
|
||||
const float slot_h = height / TriggerBox::default_triggers_per_box; // TODO
|
||||
|
||||
float ypos = 0;
|
||||
for (auto& slot : _slots) {
|
||||
|
@ -478,10 +478,10 @@ CueBoxWidget::on_unmap ()
|
|||
|
||||
CueBoxWindow::CueBoxWindow ()
|
||||
{
|
||||
CueBoxWidget* tbw = manage (new CueBoxWidget (-1., default_triggers_per_box * 16.));
|
||||
CueBoxWidget* tbw = manage (new CueBoxWidget (-1., TriggerBox::default_triggers_per_box * 16.));
|
||||
set_title (_("CueBox for XXXX"));
|
||||
|
||||
set_default_size (-1., default_triggers_per_box * 16.);
|
||||
set_default_size (-1., TriggerBox::default_triggers_per_box * 16.);
|
||||
add (*tbw);
|
||||
tbw->show ();
|
||||
}
|
||||
|
|
|
@ -1163,7 +1163,7 @@ Editor::finish_bringing_in_material (boost::shared_ptr<Region> region,
|
|||
|
||||
if (mode == ImportAsTrigger) {
|
||||
boost::shared_ptr<Region> copy (RegionFactory::create (region, true));
|
||||
for (int s = 0; s < default_triggers_per_box; ++s) {
|
||||
for (int s = 0; s < TriggerBox::default_triggers_per_box; ++s) {
|
||||
if (!existing_track->triggerbox ()->trigger (s)->region ()) {
|
||||
existing_track->triggerbox ()->set_from_selection (s, copy);
|
||||
#if 1 /* assume drop from sidebar */
|
||||
|
|
|
@ -317,7 +317,7 @@ Editor::bounce_region_selection (bool with_processing)
|
|||
|
||||
ArdourWidgets::ArdourDropdown *tslot = manage (new ArdourWidgets::ArdourDropdown ());
|
||||
|
||||
for (int c = 0; c < default_triggers_per_box; ++c) {
|
||||
for (int c = 0; c < TriggerBox::default_triggers_per_box; ++c) {
|
||||
std::string lbl = cue_marker_name (c);
|
||||
tslot->AddMenuElem (Menu_Helpers::MenuElem (lbl, sigc::bind ([] (uint32_t* t, uint32_t v, ArdourWidgets::ArdourDropdown* s, std::string l) {*t = v; s->set_text (l);}, &trigger_slot, c, tslot, lbl)));
|
||||
}
|
||||
|
|
|
@ -1063,7 +1063,7 @@ Editor::build_marker_menu (Location* loc)
|
|||
if (loc->is_cue_marker()) {
|
||||
Menu *cues_menu = manage (new Menu());
|
||||
MenuList& cue_items (cues_menu->items());
|
||||
for (int32_t n = 0; n < default_triggers_per_box; ++n) {
|
||||
for (int32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) {
|
||||
/* XXX the "letter" names of the cues need to be subject to i18n somehow */
|
||||
cue_items.push_back (MenuElem (cue_marker_name (n), sigc::bind (sigc::mem_fun(*this, &Editor::marker_menu_change_cue), n)));
|
||||
}
|
||||
|
|
|
@ -4182,7 +4182,7 @@ Editor::bounce_range_selection (BounceTarget target, bool with_processing)
|
|||
|
||||
ArdourWidgets::ArdourDropdown *tslot = manage (new ArdourWidgets::ArdourDropdown ());
|
||||
|
||||
for (int c = 0; c < default_triggers_per_box; ++c) {
|
||||
for (int c = 0; c < TriggerBox::default_triggers_per_box; ++c) {
|
||||
std::string lbl = cue_marker_name (c);
|
||||
tslot->AddMenuElem (Menu_Helpers::MenuElem (lbl, sigc::bind ([] (uint32_t* t, uint32_t v, ArdourWidgets::ArdourDropdown* s, std::string l) {*t = v; s->set_text (l);}, &trigger_slot, c, tslot, lbl)));
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ Editor::popup_ruler_menu (timepos_t const & where, ItemType t)
|
|||
|
||||
case CueMarkerBarItem:
|
||||
ruler_items.push_back (MenuElem (_("Stop All Cues"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_marker), where, Location::IsCueMarker, CueRecord::stop_all)));
|
||||
for (int32_t n = 0; n < default_triggers_per_box; ++n) {
|
||||
for (int32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) {
|
||||
ruler_items.push_back (MenuElem (string_compose (_("Cue %1"), cue_marker_name (n)), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::IsCueMarker, n)));
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -113,7 +113,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session* sess, bool in_mixer)
|
|||
, processor_box (sess, boost::bind (&MixerStrip::plugin_selector, this), mx.selection(), this, in_mixer)
|
||||
, gpm (sess, 250)
|
||||
, panners (sess)
|
||||
, trigger_display (-1., default_triggers_per_box*16.)
|
||||
, trigger_display (-1., TriggerBox::default_triggers_per_box*16.)
|
||||
, button_size_group (Gtk::SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL))
|
||||
, rec_mon_table (2, 2)
|
||||
, solo_iso_table (1, 2)
|
||||
|
|
|
@ -149,7 +149,7 @@ SlotPropertyTable::SlotPropertyTable ()
|
|||
Menu* jump_menu = manage (new Menu);
|
||||
MenuList& jitems = jump_menu->items ();
|
||||
jitems.push_back (MenuElem (_("Multi..."), sigc::bind (sigc::mem_fun (*this, &TriggerUI::edit_jump), false)));
|
||||
for (int i = 0; i < default_triggers_per_box; i++) {
|
||||
for (int i = 0; i < TriggerBox::default_triggers_per_box; i++) {
|
||||
FollowAction jump_fa = (FollowAction::JumpTrigger);
|
||||
jump_fa.targets.set(i);
|
||||
jitems.push_back (MenuElem (cue_marker_name (i), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), jump_fa, 0)));
|
||||
|
@ -166,7 +166,7 @@ SlotPropertyTable::SlotPropertyTable ()
|
|||
Menu* jump_menu_1 = manage (new Menu);
|
||||
MenuList& jitems_1 = jump_menu_1->items ();
|
||||
jitems_1.push_back (MenuElem (_("Multi..."), sigc::bind (sigc::mem_fun (*this, &TriggerUI::edit_jump), true)));
|
||||
for (int i = 0; i < default_triggers_per_box; i++) {
|
||||
for (int i = 0; i < TriggerBox::default_triggers_per_box; i++) {
|
||||
FollowAction jump_fa = (FollowAction::JumpTrigger);
|
||||
jump_fa.targets.set(i);
|
||||
jitems_1.push_back (MenuElem (cue_marker_name (i), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), jump_fa, 1)));
|
||||
|
|
|
@ -59,7 +59,7 @@ TriggerJumpDialog::on_trigger_set ()
|
|||
|
||||
int r = 0;
|
||||
|
||||
for (int i = 0; i < default_triggers_per_box; i++) { //someday this might change dynamically
|
||||
for (int i = 0; i < TriggerBox::default_triggers_per_box; i++) { //someday this might change dynamically
|
||||
ArdourButton* b = manage (new ArdourButton (ArdourButton::led_default_elements));
|
||||
|
||||
b->signal_clicked.connect(sigc::bind(sigc::mem_fun(*this, &TriggerJumpDialog::button_clicked), i));
|
||||
|
@ -112,7 +112,7 @@ TriggerJumpDialog::on_trigger_changed (PropertyChange const& what)
|
|||
|
||||
//update button display state
|
||||
ButtonList::const_iterator b = _buttonlist.begin ();
|
||||
for (int i = 0; i < default_triggers_per_box; i++) {
|
||||
for (int i = 0; i < TriggerBox::default_triggers_per_box; i++) {
|
||||
|
||||
if (b==_buttonlist.end()) {
|
||||
break;
|
||||
|
|
|
@ -384,7 +384,7 @@ TriggerMaster::set_all_colors ()
|
|||
case Gtk::RESPONSE_ACCEPT: {
|
||||
c = _color_dialog.get_color_selection()->get_current_color();
|
||||
color_t ct = Gtkmm2ext::gdk_color_to_rgba(c);
|
||||
for (int n = 0; n < default_triggers_per_box; n++) {
|
||||
for (int n = 0; n < TriggerBox::default_triggers_per_box; n++) {
|
||||
_triggerbox->trigger (n)->set_color(ct);
|
||||
}
|
||||
} break;
|
||||
|
|
|
@ -66,7 +66,7 @@ using namespace std;
|
|||
TriggerPage::TriggerPage ()
|
||||
: Tabbable (_content, _("Cues"), X_("trigger"))
|
||||
, _cue_area_frame (0.5, 0, 1.0, 0)
|
||||
, _cue_box (16, 16 * default_triggers_per_box)
|
||||
, _cue_box (16, 16 * TriggerBox::default_triggers_per_box)
|
||||
, _master_widget (16, 16)
|
||||
, _master (_master_widget.root ())
|
||||
, _selection (*this, *this)
|
||||
|
|
|
@ -65,7 +65,7 @@ TriggerStrip::TriggerStrip (Session* s, boost::shared_ptr<ARDOUR::Route> rt)
|
|||
, _pb_selection ()
|
||||
, _tmaster_widget (-1, 16)
|
||||
, _processor_box (s, boost::bind (&TriggerStrip::plugin_selector, this), _pb_selection, 0)
|
||||
, _trigger_display (-1., default_triggers_per_box * 16.)
|
||||
, _trigger_display (-1., TriggerBox::default_triggers_per_box * 16.)
|
||||
, _panners (s)
|
||||
, _level_meter (s)
|
||||
{
|
||||
|
|
|
@ -159,7 +159,7 @@ TriggerUI::register_actions ()
|
|||
{
|
||||
trigger_actions = ActionManager::create_action_group (bindings, X_("Cues"));
|
||||
|
||||
for (int32_t n = 0; n < default_triggers_per_box; ++n) {
|
||||
for (int32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) {
|
||||
const std::string action_name = string_compose ("trigger-cue-%1", n);
|
||||
const std::string display_name = string_compose (_("Trigger Cue %1"), cue_marker_name (n));
|
||||
|
||||
|
@ -587,7 +587,7 @@ TriggerUI::follow_context_menu ()
|
|||
Menu* jump_menu = manage (new Menu);
|
||||
MenuList& jitems = jump_menu->items ();
|
||||
jitems.push_back (MenuElem (_("Multi..."), sigc::bind (sigc::mem_fun (*this, &TriggerUI::edit_jump), false)));
|
||||
for (int i = 0; i < default_triggers_per_box; i++) {
|
||||
for (int i = 0; i < TriggerBox::default_triggers_per_box; i++) {
|
||||
FollowAction jump_fa = (FollowAction::JumpTrigger);
|
||||
jump_fa.targets.set(i);
|
||||
jitems.push_back (MenuElem (cue_marker_name (i), sigc::bind (sigc::mem_fun (*this, &TriggerUI::set_follow_action), jump_fa)));
|
||||
|
@ -771,7 +771,7 @@ TriggerUI::follow_action_to_string (FollowAction const & fa, bool with_targets)
|
|||
|
||||
/* Jump case, and target(s) are desired */
|
||||
if ( fa.targets.count() == 1 ) { //jump to a specific row
|
||||
for (int i = 0; i < default_triggers_per_box; i++) {
|
||||
for (int i = 0; i < TriggerBox::default_triggers_per_box; i++) {
|
||||
if (fa.targets.test(i)) {
|
||||
return string_compose (_("Jump to: %1"), cue_marker_name (i));
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ TriggerEntry::draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, FollowAct
|
|||
case FollowAction::JumpTrigger: {
|
||||
if ( icon.targets.count() == 1 ) { //Jump to a specific row; just draw the letter of the row we are jumping to
|
||||
int cue_idx = -1;
|
||||
for (int i = 0; i < default_triggers_per_box; i++) {
|
||||
for (int i = 0; i < TriggerBox::default_triggers_per_box; i++) {
|
||||
if (icon.targets.test(i)) {
|
||||
cue_idx = i;
|
||||
break;
|
||||
|
@ -906,7 +906,7 @@ TriggerBoxUI::_size_allocate (ArdourCanvas::Rect const& alloc)
|
|||
const float width = alloc.width ();
|
||||
const float height = alloc.height ();
|
||||
|
||||
const float slot_h = height / default_triggers_per_box; // TODO
|
||||
const float slot_h = height / TriggerBox::default_triggers_per_box; // TODO
|
||||
|
||||
float ypos = 0;
|
||||
for (auto& slot : _slots) {
|
||||
|
|
Loading…
Reference in New Issue