{
}
+void
+MidiTimeAxisView::set_note_highlight (uint8_t note) {
+ _piano_roll_header->set_note_highlight (note);
+}
+
void
MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
{
_view->RegionViewAdded.connect (
sigc::mem_fun(*this, &MidiTimeAxisView::region_view_added));
- midi_track()->PlaybackChannelModeChanged.connect (*this, invalidator (*this),
- boost::bind (&MidiTimeAxisView::playback_channel_mode_changed, this),
- gui_context());
- midi_track()->PlaybackChannelMaskChanged.connect (*this, invalidator (*this),
- boost::bind (&MidiTimeAxisView::playback_channel_mode_changed, this),
- gui_context());
- midi_track()->CaptureChannelModeChanged.connect (*this, invalidator (*this),
- boost::bind (&MidiTimeAxisView::capture_channel_mode_changed, this),
- gui_context());
- midi_track()->CaptureChannelMaskChanged.connect (*this, invalidator (*this),
- boost::bind (&MidiTimeAxisView::capture_channel_mode_changed, this),
- gui_context());
+ midi_track()->playback_filter().ChannelModeChanged.connect (
+ *this, invalidator (*this),
+ boost::bind (&MidiTimeAxisView::playback_channel_mode_changed, this),
+ gui_context());
+ midi_track()->playback_filter().ChannelMaskChanged.connect (
+ *this, invalidator (*this),
+ boost::bind (&MidiTimeAxisView::playback_channel_mode_changed, this),
+ gui_context());
+ midi_track()->capture_filter().ChannelModeChanged.connect (
+ *this, invalidator (*this),
+ boost::bind (&MidiTimeAxisView::capture_channel_mode_changed, this),
+ gui_context());
+ midi_track()->capture_filter().ChannelMaskChanged.connect (
+ *this, invalidator (*this),
+ boost::bind (&MidiTimeAxisView::capture_channel_mode_changed, this),
+ gui_context());
playback_channel_mode_changed ();
capture_channel_mode_changed ();
channel_selector_button->set_name ("route button");
ARDOUR_UI::instance()->set_tip (channel_selector_button, _("Click to edit channel settings"));
- /* fixed sized labels to prevent silly nonsense (though obviously,
- * they cause their own too)
- */
- set_size_request_to_display_given_text(_playback_channel_status, "Play: somemo", 2, 2); // TODO use _("Play: all/some")
- set_size_request_to_display_given_text(_capture_channel_status, "Rec: somemo", 2, 2); // TODO use _("Rec: all/some")
-
- _channel_status_box.pack_start (_playback_channel_status, false, false);
- _channel_status_box.pack_start (_capture_channel_status, false, false);
+ // Insert expanding space labels to get full width justification
+ _channel_status_box.pack_start (_playback_channel_status, false, false, 2);
+ _channel_status_box.pack_start (*Gtk::manage(new Gtk::Label(" ")), true, true);
+ _channel_status_box.pack_start (_capture_channel_status, false, false, 2);
+ _channel_status_box.pack_start (*Gtk::manage(new Gtk::Label(" ")), true, true);
_channel_status_box.pack_end (*channel_selector_button, false, false);
_channel_status_box.show_all ();
_midnam_custom_device_mode_selector.hide();
}
- _route->instrument_info().set_external_instrument (model, device_modes.front());
+ if (device_modes.size() > 0) {
+ _route->instrument_info().set_external_instrument (model, device_modes.front());
+ } else {
+ _route->instrument_info().set_external_instrument (model, "");
+ }
// Rebuild controller menu
_controller_menu_map.clear ();
}
void
-MidiTimeAxisView::set_height (uint32_t h)
+MidiTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
{
if (h >= MIDI_CONTROLS_BOX_MIN_HEIGHT) {
_midi_controls_box.show ();
which needs to know if we have just shown or hidden a scroomer /
piano roll.
*/
- RouteTimeAxisView::set_height (h);
+ RouteTimeAxisView::set_height (h, m);
}
void
{
uint16_t chn_mask = midi_track()->get_playback_channel_mask();
- _editor.begin_reversible_selection_op(_("Set Note Selection"));
+ _editor.begin_reversible_selection_op (X_("Set Note Selection"));
if (_view->num_selected_regionviews() == 0) {
_view->foreach_regionview (
{
const uint16_t chn_mask = midi_track()->get_playback_channel_mask();
- _editor.begin_reversible_selection_op(_("Add Note Selection"));
+ _editor.begin_reversible_selection_op (X_("Add Note Selection"));
if (_view->num_selected_regionviews() == 0) {
_view->foreach_regionview (
{
const uint16_t chn_mask = midi_track()->get_playback_channel_mask();
- _editor.begin_reversible_selection_op(_("Extend Note Selection"));
+ _editor.begin_reversible_selection_op (X_("Extend Note Selection"));
if (_view->num_selected_regionviews() == 0) {
_view->foreach_regionview (
{
const uint16_t chn_mask = midi_track()->get_playback_channel_mask();
- _editor.begin_reversible_selection_op(_("Toggle Note Selection"));
+ _editor.begin_reversible_selection_op (X_("Toggle Note Selection"));
if (_view->num_selected_regionviews() == 0) {
_view->foreach_regionview (
MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit)
{
Editor* real_editor = dynamic_cast<Editor*> (&_editor);
-
- real_editor->begin_reversible_command (Operations::create_region);
+ if (commit) {
+ real_editor->begin_reversible_command (Operations::create_region);
+ }
playlist()->clear_changes ();
real_editor->snap_to (pos, RoundNearest);