allow track headers to select io from right-click menu
This commit is contained in:
parent
7cd7927f0a
commit
3961017921
|
@ -141,8 +141,6 @@ MixerStrip::init ()
|
|||
int button_table_row = 0;
|
||||
|
||||
_entered_mixer_strip= 0;
|
||||
input_selector = 0;
|
||||
output_selector = 0;
|
||||
group_menu = 0;
|
||||
route_ops_menu = 0;
|
||||
ignore_comment_edit = false;
|
||||
|
@ -414,9 +412,6 @@ MixerStrip::~MixerStrip ()
|
|||
|
||||
if (this ==_entered_mixer_strip)
|
||||
_entered_mixer_strip = NULL;
|
||||
|
||||
delete input_selector;
|
||||
delete output_selector;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -484,12 +479,6 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
|||
mute_changed (0);
|
||||
update_solo_display ();
|
||||
|
||||
delete input_selector;
|
||||
input_selector = 0;
|
||||
|
||||
delete output_selector;
|
||||
output_selector = 0;
|
||||
|
||||
revert_to_default_display ();
|
||||
|
||||
/* unpack these from the parent and stuff them into our own
|
||||
|
@ -873,52 +862,6 @@ MixerStrip::output_press (GdkEventButton *ev)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
MixerStrip::edit_output_configuration ()
|
||||
{
|
||||
if (output_selector == 0) {
|
||||
|
||||
boost::shared_ptr<Send> send;
|
||||
boost::shared_ptr<IO> output;
|
||||
|
||||
if ((send = boost::dynamic_pointer_cast<Send>(_current_delivery)) != 0) {
|
||||
if (!boost::dynamic_pointer_cast<InternalSend>(send)) {
|
||||
output = send->output();
|
||||
} else {
|
||||
output = _route->output ();
|
||||
}
|
||||
} else {
|
||||
output = _route->output ();
|
||||
}
|
||||
|
||||
output_selector = new IOSelectorWindow (_session, output);
|
||||
}
|
||||
|
||||
if (output_selector->is_visible()) {
|
||||
output_selector->get_toplevel()->get_window()->raise();
|
||||
} else {
|
||||
output_selector->present ();
|
||||
}
|
||||
|
||||
output_selector->set_keep_above (true);
|
||||
}
|
||||
|
||||
void
|
||||
MixerStrip::edit_input_configuration ()
|
||||
{
|
||||
if (input_selector == 0) {
|
||||
input_selector = new IOSelectorWindow (_session, _route->input());
|
||||
}
|
||||
|
||||
if (input_selector->is_visible()) {
|
||||
input_selector->get_toplevel()->get_window()->raise();
|
||||
} else {
|
||||
input_selector->present ();
|
||||
}
|
||||
|
||||
input_selector->set_keep_above (true);
|
||||
}
|
||||
|
||||
gint
|
||||
MixerStrip::input_press (GdkEventButton *ev)
|
||||
{
|
||||
|
@ -1523,6 +1466,13 @@ MixerStrip::build_route_ops_menu ()
|
|||
items.push_back (MenuElem (_("Color..."), sigc::mem_fun (*this, &RouteUI::choose_color)));
|
||||
|
||||
items.push_back (MenuElem (_("Comments..."), sigc::mem_fun (*this, &RouteUI::open_comment_editor)));
|
||||
|
||||
items.push_back (MenuElem (_("Inputs..."), sigc::mem_fun (*this, &RouteUI::edit_input_configuration)));
|
||||
|
||||
items.push_back (MenuElem (_("Outputs..."), sigc::mem_fun (*this, &RouteUI::edit_output_configuration)));
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
if (!_route->is_master()) {
|
||||
items.push_back (MenuElem (_("Save As Template..."), sigc::mem_fun(*this, &RouteUI::save_as_template)));
|
||||
}
|
||||
|
|
|
@ -69,7 +69,6 @@ namespace Gtk {
|
|||
}
|
||||
|
||||
class Mixer_UI;
|
||||
class IOSelectorWindow;
|
||||
class MotionController;
|
||||
class RouteGroupMenu;
|
||||
class ArdourWindow;
|
||||
|
@ -220,9 +219,6 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
void bundle_input_chosen (boost::shared_ptr<ARDOUR::Bundle>);
|
||||
void bundle_output_chosen (boost::shared_ptr<ARDOUR::Bundle>);
|
||||
|
||||
void edit_input_configuration ();
|
||||
void edit_output_configuration ();
|
||||
|
||||
void diskstream_changed ();
|
||||
void io_changed_proxy ();
|
||||
|
||||
|
@ -253,9 +249,6 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
bool select_route_group (GdkEventButton *);
|
||||
void route_group_changed ();
|
||||
|
||||
IOSelectorWindow *input_selector;
|
||||
IOSelectorWindow *output_selector;
|
||||
|
||||
Gtk::Style *passthru_style;
|
||||
|
||||
void route_color_changed ();
|
||||
|
@ -279,7 +272,6 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
virtual void bus_send_display_changed (boost::shared_ptr<ARDOUR::Route>);
|
||||
|
||||
void set_current_delivery (boost::shared_ptr<ARDOUR::Delivery>);
|
||||
boost::shared_ptr<ARDOUR::Delivery> _current_delivery;
|
||||
|
||||
void drop_send ();
|
||||
PBD::ScopedConnection send_gone_connection;
|
||||
|
|
|
@ -481,6 +481,12 @@ RouteTimeAxisView::build_display_menu ()
|
|||
|
||||
items.push_back (MenuElem (_("Comments..."), sigc::mem_fun (*this, &RouteUI::open_comment_editor)));
|
||||
|
||||
items.push_back (MenuElem (_("Inputs..."), sigc::mem_fun (*this, &RouteUI::edit_input_configuration)));
|
||||
|
||||
items.push_back (MenuElem (_("Outputs..."), sigc::mem_fun (*this, &RouteUI::edit_output_configuration)));
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
if (_size_menu) {
|
||||
detach_menu (*_size_menu);
|
||||
}
|
||||
|
|
|
@ -51,6 +51,8 @@
|
|||
#include "ardour/audioengine.h"
|
||||
#include "ardour/filename_extensions.h"
|
||||
#include "ardour/midi_track.h"
|
||||
#include "ardour/internal_send.h"
|
||||
#include "ardour/send.h"
|
||||
#include "ardour/route.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/template_utils.h"
|
||||
|
@ -91,6 +93,8 @@ RouteUI::~RouteUI()
|
|||
delete record_menu;
|
||||
delete _invert_menu;
|
||||
delete comment_window;
|
||||
delete input_selector;
|
||||
delete output_selector;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -118,6 +122,9 @@ RouteUI::init ()
|
|||
multiple_solo_change = false;
|
||||
_i_am_the_modifier = 0;
|
||||
|
||||
input_selector = 0;
|
||||
output_selector = 0;
|
||||
|
||||
setup_invert_buttons ();
|
||||
|
||||
mute_button = manage (new ArdourButton);
|
||||
|
@ -215,6 +222,12 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
|||
rp->DropReferences.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::self_delete, this), gui_context());
|
||||
}
|
||||
|
||||
delete input_selector;
|
||||
input_selector = 0;
|
||||
|
||||
delete output_selector;
|
||||
output_selector = 0;
|
||||
|
||||
mute_button->set_controllable (_route->mute_control());
|
||||
solo_button->set_controllable (_route->solo_control());
|
||||
|
||||
|
@ -416,6 +429,52 @@ RouteUI::mute_release (GdkEventButton*)
|
|||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
RouteUI::edit_output_configuration ()
|
||||
{
|
||||
if (output_selector == 0) {
|
||||
|
||||
boost::shared_ptr<Send> send;
|
||||
boost::shared_ptr<IO> output;
|
||||
|
||||
if ((send = boost::dynamic_pointer_cast<Send>(_current_delivery)) != 0) {
|
||||
if (!boost::dynamic_pointer_cast<InternalSend>(send)) {
|
||||
output = send->output();
|
||||
} else {
|
||||
output = _route->output ();
|
||||
}
|
||||
} else {
|
||||
output = _route->output ();
|
||||
}
|
||||
|
||||
output_selector = new IOSelectorWindow (_session, output);
|
||||
}
|
||||
|
||||
if (output_selector->is_visible()) {
|
||||
output_selector->get_toplevel()->get_window()->raise();
|
||||
} else {
|
||||
output_selector->present ();
|
||||
}
|
||||
|
||||
output_selector->set_keep_above (true);
|
||||
}
|
||||
|
||||
void
|
||||
RouteUI::edit_input_configuration ()
|
||||
{
|
||||
if (input_selector == 0) {
|
||||
input_selector = new IOSelectorWindow (_session, _route->input());
|
||||
}
|
||||
|
||||
if (input_selector->is_visible()) {
|
||||
input_selector->get_toplevel()->get_window()->raise();
|
||||
} else {
|
||||
input_selector->present ();
|
||||
}
|
||||
|
||||
input_selector->set_keep_above (true);
|
||||
}
|
||||
|
||||
bool
|
||||
RouteUI::solo_press(GdkEventButton* ev)
|
||||
{
|
||||
|
|
|
@ -51,9 +51,9 @@ namespace Gtk {
|
|||
class Widget;
|
||||
}
|
||||
|
||||
class BindableToggleButton;
|
||||
class ArdourButton;
|
||||
class ArdourWindow;
|
||||
class IOSelectorWindow;
|
||||
|
||||
class RouteUI : public virtual AxisView
|
||||
{
|
||||
|
@ -119,6 +119,8 @@ class RouteUI : public virtual AxisView
|
|||
Gtk::Menu* solo_menu;
|
||||
Gtk::Menu* sends_menu;
|
||||
|
||||
boost::shared_ptr<ARDOUR::Delivery> _current_delivery;
|
||||
|
||||
bool mute_press(GdkEventButton*);
|
||||
bool mute_release(GdkEventButton*);
|
||||
bool solo_press(GdkEventButton*);
|
||||
|
@ -136,6 +138,9 @@ class RouteUI : public virtual AxisView
|
|||
void monitoring_changed ();
|
||||
void update_monitoring_display ();
|
||||
|
||||
void edit_input_configuration ();
|
||||
void edit_output_configuration ();
|
||||
|
||||
void step_gain_up ();
|
||||
void step_gain_down ();
|
||||
void page_gain_up ();
|
||||
|
@ -244,6 +249,8 @@ class RouteUI : public virtual AxisView
|
|||
|
||||
ArdourWindow* comment_window;
|
||||
Gtk::TextView* comment_area;
|
||||
IOSelectorWindow *input_selector;
|
||||
IOSelectorWindow *output_selector;
|
||||
|
||||
PBD::ScopedConnectionList route_connections;
|
||||
bool self_destruct;
|
||||
|
|
Loading…
Reference in New Issue