+
+boost::shared_ptr<Stripable>
+ControlProtocol::first_selected_stripable ()
+{
+ Glib::Threads::Mutex::Lock lm (first_selected_mutex);
+ return _first_selected_stripable.lock();
+}
+
+void
+ControlProtocol::set_first_selected_stripable (boost::shared_ptr<Stripable> s)
+{
+ Glib::Threads::Mutex::Lock lm (first_selected_mutex);
+ _first_selected_stripable = s;
+}
+
+void
+ControlProtocol::stripable_selection_changed (StripableNotificationListPtr sp)
+{
+ _last_selected = *sp;
+
+ {
+ Glib::Threads::Mutex::Lock lm (first_selected_mutex);
+
+ if (!_last_selected.empty()) {
+ _first_selected_stripable = _last_selected.front().lock();
+ } else {
+ _first_selected_stripable = boost::weak_ptr<Stripable>();
+ }
+ }
+
+ cerr << "CP: selection now " << _last_selected.size() << endl;
+}