canvas_rect, &_trackview));
if (_trackview.is_track()) {
- _trackview.track()->DiskstreamChanged.connect (*this, boost::bind (&StreamView::diskstream_changed, this));
- _trackview.get_diskstream()->RecordEnableChanged.connect (*this, boost::bind (&StreamView::rec_enable_changed, this));
+ _trackview.track()->DiskstreamChanged.connect (*this, boost::bind (&StreamView::diskstream_changed, this), gui_context());
+ _trackview.get_diskstream()->RecordEnableChanged.connect (*this, boost::bind (&StreamView::rec_enable_changed, this), gui_context());
- _trackview.session()->TransportStateChange.connect (*this, boost::bind (&StreamView::transport_changed, this));
- _trackview.session()->TransportLooped.connect (*this, boost::bind (&StreamView::transport_looped, this));
- _trackview.session()->RecordStateChanged.connect (*this, boost::bind (&StreamView::sess_rec_enable_changed, this));
+ _trackview.session()->TransportStateChange.connect (*this, boost::bind (&StreamView::transport_changed, this), gui_context());
+ _trackview.session()->TransportLooped.connect (*this, boost::bind (&StreamView::transport_looped, this), gui_context());
+ _trackview.session()->RecordStateChanged.connect (*this, boost::bind (&StreamView::sess_rec_enable_changed, this), gui_context());
}
ColorsChanged.connect (sigc::mem_fun (*this, &StreamView::color_handler));
{
playlist_change_connection.disconnect();
playlist_changed (ds);
- ds->PlaylistChanged.connect (playlist_change_connection, boost::bind (&StreamView::playlist_changed_weak, this, boost::weak_ptr<Diskstream> (ds)));
+ ds->PlaylistChanged.connect (playlist_change_connection, boost::bind (&StreamView::playlist_changed_weak, this, boost::weak_ptr<Diskstream> (ds)), gui_context());
}
void
/* catch changes */
- ds->playlist()->Modified.connect (playlist_connections, boost::bind (&StreamView::playlist_modified_weak, this, ds));
- ds->playlist()->RegionAdded.connect (playlist_connections, boost::bind (&StreamView::add_region_view_weak, this, _1));
- ds->playlist()->RegionRemoved.connect (playlist_connections, boost::bind (&StreamView::remove_region_view, this, _1));
+ ds->playlist()->Modified.connect (playlist_connections, boost::bind (&StreamView::playlist_modified_weak, this, ds), gui_context());
+ ds->playlist()->RegionAdded.connect (playlist_connections, ui_bind (&StreamView::add_region_view_weak, this, _1), gui_context());
+ ds->playlist()->RegionRemoved.connect (playlist_connections, ui_bind (&StreamView::remove_region_view, this, _1), gui_context());
}
void
void
StreamView::rec_enable_changed ()
{
- Gtkmm2ext::UI::instance()->call_slot (boost::bind (&StreamView::setup_rec_box, this));
+ setup_rec_box ();
}
void
StreamView::sess_rec_enable_changed ()
{
- Gtkmm2ext::UI::instance()->call_slot (boost::bind (&StreamView::setup_rec_box, this));
+ setup_rec_box ();
}
void
StreamView::transport_changed()
{
- Gtkmm2ext::UI::instance()->call_slot (boost::bind (&StreamView::setup_rec_box, this));
+ setup_rec_box ();
}
void
return 0;
}
+uint32_t
+StreamView::num_selected_regionviews () const
+{
+ uint32_t cnt = 0;
+
+ for (list<RegionView*>::const_iterator i = region_views.begin(); i != region_views.end(); ++i) {
+ if ((*i)->get_selected()) {
+ ++cnt;
+ }
+ }
+ return cnt;
+}
+
void
StreamView::foreach_regionview (sigc::slot<void,RegionView*> slot)
{
}
}
+void
+StreamView::foreach_selected_regionview (sigc::slot<void,RegionView*> slot)
+{
+ for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
+ if ((*i)->get_selected()) {
+ slot (*i);
+ }
+ }
+}
+
void
StreamView::set_selected_regionviews (RegionSelection& regions)
{