remove Glib::ustring from gtk2_ardour
[ardour.git] / gtk2_ardour / panner_ui.cc
index 1a48353e0beee49b7b39296191e0df1ec418c0ac..263a8ec51836d3f9c3f59c85ebcfbffd4bf43ced 100644 (file)
@@ -21,7 +21,6 @@
 #include "ardour/io.h"
 #include "ardour/dB.h"
 #include <gtkmm2ext/utils.h>
-#include <gtkmm2ext/stop_signal.h>
 #include <gtkmm2ext/barcontroller.h>
 #include "midi++/manager.h"
 #include "pbd/fastlog.h"
@@ -406,8 +405,10 @@ PannerUI::setup_pan ()
                        boost::shared_ptr<AutomationControl> ac = _panner->pan_control (asz);
 
                        if (asz) {
-                               bc->StartGesture.connect (sigc::mem_fun (*ac, &AutomationControl::start_touch));
-                               bc->StopGesture.connect (sigc::mem_fun (*ac, &AutomationControl::stop_touch));
+                               bc->StartGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch), 
+                                                                      boost::weak_ptr<AutomationControl> (ac)));
+                               bc->StopGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch), 
+                                                                     boost::weak_ptr<AutomationControl>(ac)));
                        }
 
                        char buf[64];
@@ -460,6 +461,26 @@ PannerUI::setup_pan ()
        }
 }
 
+void
+PannerUI::start_touch (boost::weak_ptr<AutomationControl> wac)
+{
+        boost::shared_ptr<AutomationControl> ac = wac.lock();
+        if (!ac) {
+                return;
+        }
+        ac->start_touch (ac->session().transport_frame());
+}
+
+void
+PannerUI::stop_touch (boost::weak_ptr<AutomationControl> wac)
+{
+        boost::shared_ptr<AutomationControl> ac = wac.lock();
+        if (!ac) {
+                return;
+        }
+        ac->stop_touch (false, ac->session().transport_frame());
+}
+
 bool
 PannerUI::pan_button_event (GdkEventButton* ev, uint32_t which)
 {