Large nasty commit in the form of a 5000 line patch chock-full of completely
[ardour.git] / gtk2_ardour / send_ui.cc
index 25546fb92a3ce33990e3504b07bbde8f96f174a5..be95f753e74b134edaf1c5a3167d3e460fd3387c 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include <ardour/send.h>
-#include <gtkmmext/doi.h>
+#include <gtkmm2ext/doi.h>
 
 #include "utils.h"
 #include "send_ui.h"
@@ -28,6 +28,7 @@
 #include "gui_thread.h"
 
 using namespace ARDOUR;
+using namespace PBD;
 
 SendUI::SendUI (Send& s, Session& se)
        : _send (s),
@@ -54,8 +55,8 @@ SendUI::SendUI (Send& s, Session& se)
 
        _send.set_metering (true);
 
-       _send.output_changed.connect (slot (*this, &SendUI::ins_changed));
-       _send.output_changed.connect (slot (*this, &SendUI::outs_changed));
+       _send.output_changed.connect (mem_fun (*this, &SendUI::ins_changed));
+       _send.output_changed.connect (mem_fun (*this, &SendUI::outs_changed));
        
        panners.set_width (Wide);
        panners.setup_pan ();
@@ -63,8 +64,8 @@ SendUI::SendUI (Send& s, Session& se)
        gpm.setup_meters ();
        gpm.set_fader_name ("SendUIFrame");
 
-       screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect (slot (*this, &SendUI::update));
-       fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (slot (*this, &SendUI::fast_update));
+       // screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect (mem_fun (*this, &SendUI::update));
+       fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &SendUI::fast_update));
 }
 
 SendUI::~SendUI ()
@@ -80,7 +81,7 @@ SendUI::~SendUI ()
 void
 SendUI::ins_changed (IOChange change, void* ignored)
 {
-       ENSURE_GUI_THREAD(bind (slot (*this, &SendUI::ins_changed), change, ignored));
+       ENSURE_GUI_THREAD(bind (mem_fun (*this, &SendUI::ins_changed), change, ignored));
        if (change & ConfigurationChanged) {
                panners.setup_pan ();
        }
@@ -89,7 +90,7 @@ SendUI::ins_changed (IOChange change, void* ignored)
 void
 SendUI::outs_changed (IOChange change, void* ignored)
 {
-       ENSURE_GUI_THREAD(bind (slot (*this, &SendUI::outs_changed), change, ignored));
+       ENSURE_GUI_THREAD(bind (mem_fun (*this, &SendUI::outs_changed), change, ignored));
        if (change & ConfigurationChanged) {
                panners.setup_pan ();
                gpm.setup_meters ();
@@ -99,7 +100,7 @@ SendUI::outs_changed (IOChange change, void* ignored)
 void
 SendUI::send_going_away (Redirect *ignored)
 {
-       ENSURE_GUI_THREAD (bind (slot (*this, &SendUI::send_going_away), ignored));
+       ENSURE_GUI_THREAD (bind (mem_fun (*this, &SendUI::send_going_away), ignored));
 
        delete this;
 }
@@ -107,14 +108,13 @@ SendUI::send_going_away (Redirect *ignored)
 void
 SendUI::update ()
 {
-       gpm.update_meters ();
 }
 
 void
 SendUI::fast_update ()
 {
        if (_session.meter_falloff() > 0.0f) {
-               gpm.update_meters_falloff ();
+               gpm.update_meters ();
        }
 }
        
@@ -131,9 +131,9 @@ SendUIWindow::SendUIWindow (Send& s, Session& ss)
        add (vpacker);
        set_name ("SendUIWindow");
 
-       s.GoingAway.connect (slot (*this, &SendUIWindow::send_going_away));
+       s.GoingAway.connect (mem_fun (*this, &SendUIWindow::send_going_away));
 
-       delete_event.connect (bind (slot (just_hide_it), reinterpret_cast<Window *> (this)));
+       signal_delete_event().connect (bind (ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
 
 }
 
@@ -145,7 +145,7 @@ SendUIWindow::~SendUIWindow ()
 void
 SendUIWindow::send_going_away (Redirect *ignored)
 {
-       ENSURE_GUI_THREAD(bind (slot (*this, &SendUIWindow::send_going_away), ignored));
+       ENSURE_GUI_THREAD(bind (mem_fun (*this, &SendUIWindow::send_going_away), ignored));
        
        delete this;
 }