From bf107f93e142450c709657a4817c49f89b13b8ca Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 16 Apr 2012 19:08:22 +0000 Subject: [PATCH] MCP: no fake touch for anything, actually git-svn-id: svn://localhost/ardour2/branches/3.0@11989 d708f5d6-7413-0410-9779-e7cbd77b26cf --- .../mackie/mackie_control_protocol.cc | 41 ------------------- .../surfaces/mackie/mackie_control_protocol.h | 3 -- 2 files changed, 44 deletions(-) diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index c681d5ac89..40ad239696 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -900,47 +900,6 @@ MackieControlProtocol::stop () return 0; } -/** Add a timeout so that a control's in_use flag will be reset some time in the future. - * @param in_use_control the control whose in_use flag to reset. - * @param touch_control a touch control to emit an event for, or 0. - */ -void -MackieControlProtocol::add_in_use_timeout (Surface& surface, Control& in_use_control, boost::weak_ptr touched) -{ - Glib::RefPtr timeout (Glib::TimeoutSource::create (250)); // milliseconds - - in_use_control.in_use_connection.disconnect (); - in_use_control.in_use_connection = timeout->connect ( - sigc::bind (sigc::mem_fun (*this, &MackieControlProtocol::control_in_use_timeout), &surface, &in_use_control, touched)); - - timeout->attach (main_loop()->get_context()); - - DEBUG_TRACE (DEBUG::MackieControl, string_compose ("timeout queued for surface %1, control %2\n", - surface.number(), &in_use_control));} - -/** Handle timeouts to reset in_use for controls that can't - * do this by themselves (e.g. pots, and faders without touch support). - * @param in_use_control the control whose in_use flag to reset. - * @param touch_control a touch control to emit an event for, or 0. - */ -bool -MackieControlProtocol::control_in_use_timeout (Surface* surface, Control* in_use_control, boost::weak_ptr wtouched) -{ - boost::shared_ptr touched (wtouched.lock()); - - DEBUG_TRACE (DEBUG::MackieControl, string_compose ("timeout elapsed for surface %1, control %2\n", surface->number(), in_use_control)); - - in_use_control->set_in_use (false); - - if (touched) { - /* end the touch, and mark the end */ - touched->stop_touch (session->transport_frame(), true); - } - - // only call this method once from the timer - return false; -} - void MackieControlProtocol::update_led (Surface& surface, Button& button, Mackie::LedState ls) { diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index ea3e69d9a7..a2050fbeec 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -177,8 +177,6 @@ class MackieControlProtocol ARDOUR::Session & get_session() { return *session; } framepos_t transport_frame() const; - void add_in_use_timeout (Mackie::Surface& surface, Mackie::Control& in_use_control, boost::weak_ptr touched); - int modifier_state() const { return _modifier_state; } typedef std::list > ControlList; @@ -281,7 +279,6 @@ class MackieControlProtocol void create_surfaces (); void port_connected_or_disconnected (std::string, std::string, bool); - bool control_in_use_timeout (Mackie::Surface*, Mackie::Control *, boost::weak_ptr); bool periodic(); void build_gui (); bool midi_input_handler (Glib::IOCondition ioc, MIDI::Port* port);