X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fsend_ui.cc;h=3cc17faaea5c2e64087a7fbb9c562472109b6fe8;hb=71a4796dc3dbf8a7fe1df5c5d7acea388b40eae0;hp=7dab7780548b38a0a71ea38224e556806dd85575;hpb=bb9cc45cd22af67ac275a5e73accbe14fee664d8;p=ardour.git diff --git a/gtk2_ardour/send_ui.cc b/gtk2_ardour/send_ui.cc index 7dab778054..3cc17faaea 100644 --- a/gtk2_ardour/send_ui.cc +++ b/gtk2_ardour/send_ui.cc @@ -22,6 +22,7 @@ #include "ardour/amp.h" #include "ardour/io.h" #include "ardour/send.h" +#include "ardour/rc_configuration.h" #include "utils.h" #include "send_ui.h" @@ -29,15 +30,16 @@ #include "ardour_ui.h" #include "gui_thread.h" +#include "i18n.h" + using namespace std; using namespace ARDOUR; using namespace PBD; -SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr s, Session& se) +SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr s, Session* session) : _send (s) - , _session (se) - , _gpm (se) - , _panners (se) + , _gpm (session, 250) + , _panners (session) { _panners.set_panner (s->panner()); _gpm.set_controls (boost::shared_ptr(), s->meter(), s->amp()); @@ -49,9 +51,9 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr s, Session& se) _vbox.set_border_width (5); _vbox.pack_start (_hbox, false, false, false); - _vbox.pack_start (_panners, false,false); + _vbox.pack_start (_panners, false, false); - io = manage (new IOSelector (parent, se, s->output())); + io = manage (new IOSelector (parent, session, s->output())); pack_start (_vbox, false, false); @@ -61,8 +63,8 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr s, Session& se) _send->set_metering (true); - _send->input()->changed.connect (mem_fun (*this, &SendUI::ins_changed)); - _send->output()->changed.connect (mem_fun (*this, &SendUI::outs_changed)); + _send->input()->changed.connect (connections, invalidator (*this), ui_bind (&SendUI::ins_changed, this, _1, _2), gui_context()); + _send->output()->changed.connect (connections, invalidator (*this), ui_bind (&SendUI::outs_changed, this, _1, _2), gui_context()); _panners.set_width (Wide); _panners.setup_pan (); @@ -71,9 +73,9 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr s, Session& se) _gpm.set_fader_name ("SendUIFrame"); // screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect ( - // mem_fun (*this, &SendUI::update)); + // sigc::mem_fun (*this, &SendUI::update)); fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect ( - mem_fun (*this, &SendUI::fast_update)); + sigc::mem_fun (*this, &SendUI::fast_update)); } SendUI::~SendUI () @@ -89,7 +91,7 @@ SendUI::~SendUI () void SendUI::ins_changed (IOChange change, void* ignored) { - ENSURE_GUI_THREAD(bind (mem_fun (*this, &SendUI::ins_changed), change, ignored)); + ENSURE_GUI_THREAD (*this, &SendUI::ins_changed, change, ignored) if (change & ConfigurationChanged) { _panners.setup_pan (); } @@ -98,7 +100,7 @@ SendUI::ins_changed (IOChange change, void* ignored) void SendUI::outs_changed (IOChange change, void* ignored) { - ENSURE_GUI_THREAD(bind (mem_fun (*this, &SendUI::outs_changed), change, ignored)); + ENSURE_GUI_THREAD (*this, &SendUI::outs_changed, change, ignored) if (change & ConfigurationChanged) { _panners.setup_pan (); _gpm.setup_meters (); @@ -118,10 +120,10 @@ SendUI::fast_update () } } -SendUIWindow::SendUIWindow (boost::shared_ptr s, Session& ss) - : ArdourDialog (string("Ardour: send ") + s->name()) +SendUIWindow::SendUIWindow (boost::shared_ptr s, Session* session) + : ArdourDialog (string (_("Send ")) + s->name()) { - ui = new SendUI (this, s, ss); + ui = new SendUI (this, s, session); hpacker.pack_start (*ui, true, true); @@ -130,10 +132,9 @@ SendUIWindow::SendUIWindow (boost::shared_ptr s, Session& ss) set_name ("SendUIWindow"); - going_away_connection = s->GoingAway.connect ( - mem_fun (*this, &SendUIWindow::send_going_away)); + s->DropReferences.connect (going_away_connection, invalidator (*this), boost::bind (&SendUIWindow::send_going_away, this), gui_context()); - signal_delete_event().connect (bind ( + signal_delete_event().connect (sigc::bind ( sigc::ptr_fun (just_hide_it), reinterpret_cast (this))); } @@ -146,8 +147,8 @@ SendUIWindow::~SendUIWindow () void SendUIWindow::send_going_away () { - ENSURE_GUI_THREAD (mem_fun (*this, &SendUIWindow::send_going_away)); - delete_when_idle (this); + ENSURE_GUI_THREAD (*this, &SendUIWindow::send_going_away) going_away_connection.disconnect (); + delete_when_idle (this); }