remove channel filter status and button from MIDI track header, access via context menu
This commit is contained in:
parent
8405f642e7
commit
7688d22456
@ -241,26 +241,6 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
||||
_view->RegionViewAdded.connect (
|
||||
sigc::mem_fun(*this, &MidiTimeAxisView::region_view_added));
|
||||
|
||||
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 ();
|
||||
|
||||
if (!_editor.have_idled()) {
|
||||
/* first idle will do what we need */
|
||||
} else {
|
||||
@ -289,25 +269,6 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
||||
_midi_controls_box.set_homogeneous(false);
|
||||
_midi_controls_box.set_border_width (2);
|
||||
|
||||
_channel_status_box.set_homogeneous (false);
|
||||
_channel_status_box.set_spacing (4);
|
||||
|
||||
ArdourButton *channel_selector_button = manage (new ArdourButton(_("Chns")));
|
||||
channel_selector_button->set_name ("route button");
|
||||
set_tooltip (channel_selector_button, _("Click to edit channel settings"));
|
||||
|
||||
// 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 ();
|
||||
|
||||
channel_selector_button->signal_clicked.connect (sigc::mem_fun (*this, &MidiTimeAxisView::toggle_channel_selector));
|
||||
|
||||
_midi_controls_box.pack_start (_channel_status_box, false, false, 10);
|
||||
|
||||
MIDI::Name::MidiPatchManager::instance().PatchesChanged.connect (*this, invalidator (*this),
|
||||
boost::bind (&MidiTimeAxisView::setup_midnam_patches, this),
|
||||
gui_context());
|
||||
@ -1786,42 +1747,6 @@ MidiTimeAxisView::contents_height_changed ()
|
||||
_range_scroomer->queue_resize ();
|
||||
}
|
||||
|
||||
void
|
||||
MidiTimeAxisView::playback_channel_mode_changed ()
|
||||
{
|
||||
/* Invalidate the controller automation menu */
|
||||
delete controller_menu;
|
||||
controller_menu = 0;
|
||||
/* Update the button text */
|
||||
switch (midi_track()->get_playback_channel_mode()) {
|
||||
case AllChannels:
|
||||
_playback_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2</i>", _("Play"), _("all")));
|
||||
break;
|
||||
case FilterChannels:
|
||||
_playback_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2</i>", _("Play"), _("some")));
|
||||
break;
|
||||
case ForceChannel:
|
||||
_playback_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2>%3</i>", _("Play"), _("all"), PBD::ffs (midi_track()->get_playback_channel_mask())));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MidiTimeAxisView::capture_channel_mode_changed ()
|
||||
{
|
||||
switch (midi_track()->get_capture_channel_mode()) {
|
||||
case AllChannels:
|
||||
_capture_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2</i>", _("Rec"), _("all")));
|
||||
break;
|
||||
case FilterChannels:
|
||||
_capture_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2</i>", _("Rec"), _("some")));
|
||||
break;
|
||||
case ForceChannel:
|
||||
_capture_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2>%3</i>", _("Rec"), _("all"), PBD::ffs (midi_track()->get_capture_channel_mask())));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
MidiTimeAxisView::paste (framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t sub_num)
|
||||
{
|
||||
|
@ -158,9 +158,6 @@ private:
|
||||
Gtk::RadioMenuItem* _meter_color_mode_item;
|
||||
Gtk::RadioMenuItem* _channel_color_mode_item;
|
||||
Gtk::RadioMenuItem* _track_color_mode_item;
|
||||
Gtk::Label _playback_channel_status;
|
||||
Gtk::Label _capture_channel_status;
|
||||
Gtk::HBox _channel_status_box;
|
||||
Gtk::VBox _midi_controls_box;
|
||||
MidiChannelSelectorWindow* _channel_selector;
|
||||
ArdourDropdown _midnam_model_selector;
|
||||
@ -201,9 +198,6 @@ private:
|
||||
ParameterMenuMap _controller_menu_map;
|
||||
|
||||
StepEditor* _step_editor;
|
||||
|
||||
void capture_channel_mode_changed();
|
||||
void playback_channel_mode_changed();
|
||||
};
|
||||
|
||||
#endif /* __ardour_midi_time_axis_h__ */
|
||||
|
@ -526,13 +526,13 @@ RouteTimeAxisView::build_automation_action_menu (bool for_selection)
|
||||
automation_action_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
items.push_back (MenuElem (_("Show All Automation"),
|
||||
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::show_all_automation), for_selection)));
|
||||
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::show_all_automation), for_selection)));
|
||||
|
||||
items.push_back (MenuElem (_("Show Existing Automation"),
|
||||
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::show_existing_automation), for_selection)));
|
||||
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::show_existing_automation), for_selection)));
|
||||
|
||||
items.push_back (MenuElem (_("Hide All Automation"),
|
||||
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::hide_all_automation), for_selection)));
|
||||
sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::hide_all_automation), for_selection)));
|
||||
|
||||
/* Attach the plugin submenu. It may have previously been used elsewhere,
|
||||
so it was detached above
|
||||
@ -577,7 +577,7 @@ RouteTimeAxisView::build_automation_action_menu (bool for_selection)
|
||||
items.push_back (CheckMenuElem (_("Pan"), sigc::mem_fun (*this, &RouteTimeAxisView::update_pan_track_visibility)));
|
||||
pan_automation_item = dynamic_cast<Gtk::CheckMenuItem*> (&items.back ());
|
||||
pan_automation_item->set_active ((!for_selection || _editor.get_selection().tracks.size() == 1) &&
|
||||
(!pan_tracks.empty() && string_is_affirmative (pan_tracks.front()->gui_property ("visible"))));
|
||||
(!pan_tracks.empty() && string_is_affirmative (pan_tracks.front()->gui_property ("visible"))));
|
||||
|
||||
set<Evoral::Parameter> const & params = _route->pannable()->what_can_be_automated ();
|
||||
for (set<Evoral::Parameter>::const_iterator p = params.begin(); p != params.end(); ++p) {
|
||||
@ -852,6 +852,17 @@ RouteTimeAxisView::build_display_menu ()
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
if (is_midi_track()) {
|
||||
Menu* midi_menu = manage (new Menu);
|
||||
MenuList& midi_items = midi_menu->items();
|
||||
midi_menu->set_name (X_("ArdourContextMenu"));
|
||||
|
||||
midi_items.push_back (MenuElem (_("Channel Management"), sigc::mem_fun (*this, &RouteTimeAxisView::toggle_channel_selector)));
|
||||
|
||||
items.push_back (MenuElem (_("MIDI"), *midi_menu));
|
||||
items.push_back (SeparatorElem());
|
||||
}
|
||||
|
||||
int active = 0;
|
||||
int inactive = 0;
|
||||
TrackSelection const & s = _editor.get_selection().tracks;
|
||||
@ -1420,7 +1431,7 @@ RouteTimeAxisView::name_entry_changed (string const& str)
|
||||
}
|
||||
|
||||
string x = str;
|
||||
|
||||
|
||||
strip_whitespace_edges (x);
|
||||
|
||||
if (x.empty()) {
|
||||
@ -2928,4 +2939,3 @@ RouteTimeAxisView::set_marked_for_display (bool yn)
|
||||
{
|
||||
return RouteUI::mark_hidden (!yn);
|
||||
}
|
||||
|
||||
|
@ -214,6 +214,8 @@ protected:
|
||||
void route_property_changed (const PBD::PropertyChange&);
|
||||
bool name_entry_changed (std::string const&);
|
||||
|
||||
virtual void toggle_channel_selector () {}
|
||||
|
||||
void blink_rec_display (bool onoff);
|
||||
|
||||
virtual void label_view ();
|
||||
|
Loading…
Reference in New Issue
Block a user