X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=inline;f=gtk2_ardour%2Fsend_ui.cc;h=627fe531f68e0dbcf6fb21d2ca1ea0e41e3b2590;hb=1bbe08af1a44f46c13873b762decc7629274929d;hp=4c1bb9fec348204d19588bb291767fe7cb35bbc2;hpb=aae367b63c9b619db1e40f27dc334c6987219481;p=ardour.git diff --git a/gtk2_ardour/send_ui.cc b/gtk2_ardour/send_ui.cc index 4c1bb9fec3..627fe531f6 100644 --- a/gtk2_ardour/send_ui.cc +++ b/gtk2_ardour/send_ui.cc @@ -30,6 +30,8 @@ #include "ardour_ui.h" #include "gui_thread.h" +#include "i18n.h" + using namespace std; using namespace ARDOUR; using namespace PBD; @@ -39,7 +41,9 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr s, Session* session , _gpm (session, 250) , _panners (session) { - _panners.set_panner (s->panner()); + assert (_send); + + _panners.set_panner (s->panner_shell(), s->panner()); _gpm.set_controls (boost::shared_ptr(), s->meter(), s->amp()); _hbox.pack_start (_gpm, true, true); @@ -49,7 +53,10 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr s, Session* session _vbox.set_border_width (5); _vbox.pack_start (_hbox, false, false, false); - _vbox.pack_start (_panners, false, false); + // until sends have their own Pannable, don't show this + // because it controls the Route Pannable which confuses + // users (among others) + // _vbox.pack_start (_panners, false, false); io = manage (new IOSelector (parent, session, s->output())); @@ -57,12 +64,15 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr s, Session* session pack_start (*io, true, true); - show_all (); + io->show (); + _gpm.show_all (); + _panners.show_all (); + _vbox.show (); + _hbox.show (); _send->set_metering (true); - _send->input()->changed.connect (connections, boost::bind (&SendUI::ins_changed, this, _1, _2)); - _send->output()->changed.connect (connections, boost::bind (&SendUI::outs_changed, this, _1, _2)); + _send->output()->changed.connect (connections, invalidator (*this), ui_bind (&SendUI::outs_changed, this, _1, _2), gui_context()); _panners.set_width (Wide); _panners.setup_pan (); @@ -87,19 +97,10 @@ SendUI::~SendUI () } void -SendUI::ins_changed (IOChange change, void* ignored) -{ - ENSURE_GUI_THREAD (*this, &SendUI::ins_changed, change, ignored) - if (change & ConfigurationChanged) { - _panners.setup_pan (); - } -} - -void -SendUI::outs_changed (IOChange change, void* ignored) +SendUI::outs_changed (IOChange change, void* /*ignored*/) { ENSURE_GUI_THREAD (*this, &SendUI::outs_changed, change, ignored) - if (change & ConfigurationChanged) { + if (change.type & IOChange::ConfigurationChanged) { _panners.setup_pan (); _gpm.setup_meters (); } @@ -119,18 +120,20 @@ SendUI::fast_update () } SendUIWindow::SendUIWindow (boost::shared_ptr s, Session* session) - : ArdourDialog (string("Ardour: send ") + s->name()) + : ArdourWindow (string (_("Send ")) + s->name()) { ui = new SendUI (this, s, session); hpacker.pack_start (*ui, true, true); - get_vbox()->set_border_width (5); - get_vbox()->pack_start (hpacker); + add (hpacker); set_name ("SendUIWindow"); - s->GoingAway.connect (going_away_connection, boost::bind (&SendUIWindow::send_going_away, this)); + ui->show (); + hpacker.show (); + + s->DropReferences.connect (going_away_connection, invalidator (*this), boost::bind (&SendUIWindow::send_going_away, this), gui_context()); signal_delete_event().connect (sigc::bind ( sigc::ptr_fun (just_hide_it),