rework narrow mode metric (again)
[ardour.git] / gtk2_ardour / send_ui.cc
index 14068bbc5bb1c0d8e73797fe0e8d63d94b00d2bc..4a16c572595864990764795a4bdaf31ba87d9911 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <gtkmm2ext/doi.h>
 
-#include "ardour/amp.h"
 #include "ardour/io.h"
 #include "ardour/send.h"
 #include "ardour/rc_configuration.h"
@@ -43,7 +42,7 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr<Send> s, Session* session
 {
        assert (_send);
 
-       _panners.set_panner (s->panner());
+       _panners.set_panner (s->panner_shell(), s->panner());
        _gpm.set_controls (boost::shared_ptr<Route>(), s->meter(), s->amp());
 
        _hbox.pack_start (_gpm, true, true);
@@ -53,7 +52,10 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr<Send> 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()));
 
@@ -69,7 +71,7 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr<Send> s, Session* session
 
        _send->set_metering (true);
 
-       _send->output()->changed.connect (connections, invalidator (*this), ui_bind (&SendUI::outs_changed, this, _1, _2), gui_context());
+       _send->output()->changed.connect (connections, invalidator (*this), boost::bind (&SendUI::outs_changed, this, _1, _2), gui_context());
 
        _panners.set_width (Wide);
        _panners.setup_pan ();
@@ -117,14 +119,13 @@ SendUI::fast_update ()
 }
 
 SendUIWindow::SendUIWindow (boost::shared_ptr<Send> s, Session* session)
-       : ArdourDialog (string (_("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");
 
@@ -132,10 +133,6 @@ SendUIWindow::SendUIWindow (boost::shared_ptr<Send> s, Session* session)
        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),
-                                              reinterpret_cast<Window *> (this)));
 }
 
 SendUIWindow::~SendUIWindow ()