drastic rethink of the relationship between remote control ID and route order keys. unless the user explicitly switches to UserOrdered, Route::_remote_control_id is an unallocated pointer, and Route::remote_control_id() simply returns a value based on the relevant order_key() value. Also, change the key used in the Route::order_keys std::map<> from a string to an enum, since there is no evidence that we are benefitting from the theoretical benefit of using a string. Generally tidy up allocation of order keys so that the master and monitor busses always get a "special" MixerSort key value, based on the MMC ID for master (already defined within Ardour), and all other tracks/busses start at zero. Syncing keys between editor and mixer will leave the MixerSort key for the master and monitor bus alone, reflecting the fact that we display these in their own distinct parts of the GUI and they are not orderable like other tracks or busses within the mixer window

git-svn-id: svn://localhost/ardour2/branches/3.0@12923 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-06-25 12:46:13 +00:00
parent f2f35e50a0
commit 97d920593f
23 changed files with 268 additions and 189 deletions

View file

@ -1716,27 +1716,39 @@ void
RouteUI::open_remote_control_id_dialog ()
{
ArdourDialog dialog (_("Remote Control ID"));
SpinButton* spin = 0;
uint32_t const limit = _session->ntracks() + _session->nbusses () + 4;
dialog.get_vbox()->set_border_width (18);
HBox* hbox = manage (new HBox);
hbox->set_spacing (6);
hbox->pack_start (*manage (new Label (_("Remote control ID:"))));
SpinButton* spin = manage (new SpinButton);
spin->set_digits (0);
spin->set_increments (1, 10);
spin->set_range (0, limit);
spin->set_value (_route->remote_control_id());
hbox->pack_start (*spin);
dialog.get_vbox()->pack_start (*hbox);
dialog.add_button (Stock::CANCEL, RESPONSE_CANCEL);
dialog.add_button (Stock::APPLY, RESPONSE_ACCEPT);
if (Config->get_remote_model() == UserOrdered) {
uint32_t const limit = _session->ntracks() + _session->nbusses () + 4;
HBox* hbox = manage (new HBox);
hbox->set_spacing (6);
hbox->pack_start (*manage (new Label (_("Remote control ID:"))));
spin = manage (new SpinButton);
spin->set_digits (0);
spin->set_increments (1, 10);
spin->set_range (0, limit);
spin->set_value (_route->remote_control_id());
hbox->pack_start (*spin);
dialog.get_vbox()->pack_start (*hbox);
dialog.add_button (Stock::CANCEL, RESPONSE_CANCEL);
dialog.add_button (Stock::APPLY, RESPONSE_ACCEPT);
} else {
Label* l = manage (new Label());
l->set_markup (string_compose (_("Remote Control IDs are currently determined by track/bus ordering in %1\n\n\n"
"<span size=\"small\" style=\"italic\">Use the User Interaction tab of the Preferences window if you want to change this</span>"),
(Config->get_remote_model() == MixerOrdered ? _("the mixer") : ("the editor"))));
dialog.get_vbox()->pack_start (*l);
dialog.add_button (Stock::OK, RESPONSE_CANCEL);
}
dialog.show_all ();
int const r = dialog.run ();
if (r == RESPONSE_ACCEPT) {
if (r == RESPONSE_ACCEPT && spin) {
_route->set_remote_control_id (spin->get_value_as_int ());
}
}