canvas_rect->property_outline_what() = (guint32) (0x2|0x8); // outline RHS and bottom
- canvas_rect->signal_event().connect (bind (
- mem_fun (_trackview.editor(), &PublicEditor::canvas_stream_view_event),
+ canvas_rect->signal_event().connect (sigc::bind (
+ sigc::mem_fun (_trackview.editor(), &PublicEditor::canvas_stream_view_event),
canvas_rect, &_trackview));
if (_trackview.is_track()) {
- _trackview.track()->DiskstreamChanged.connect (
- mem_fun (*this, &StreamView::diskstream_changed));
- _trackview.session().TransportStateChange.connect (
- mem_fun (*this, &StreamView::transport_changed));
- _trackview.session().TransportLooped.connect (
- mem_fun (*this, &StreamView::transport_looped));
- _trackview.get_diskstream()->RecordEnableChanged.connect (
- mem_fun (*this, &StreamView::rec_enable_changed));
- _trackview.session().RecordStateChanged.connect (
- mem_fun (*this, &StreamView::sess_rec_enable_changed));
+ _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), 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 (mem_fun (*this, &StreamView::color_handler));
+ ColorsChanged.connect (sigc::mem_fun (*this, &StreamView::color_handler));
}
StreamView::~StreamView ()
void
StreamView::add_region_view (boost::shared_ptr<Region> r)
{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_region_view_weak), boost::weak_ptr<Region>(r)));
+ ENSURE_GUI_THREAD (*this, &StreamView::add_region_view_weak, boost::weak_ptr<Region>(r));
add_region_view_internal (r, true);
void
StreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), weak_r));
+ ENSURE_GUI_THREAD (*this, &StreamView::remove_region_view, weak_r)
boost::shared_ptr<Region> r (weak_r.lock());
if (((*i)->region()) == r) {
RegionView* rv = *i;
region_views.erase (i);
+ cerr << "Deleting RV for " << r->name() << " @ " << r << endl;
delete rv;
break;
}
{
playlist_change_connection.disconnect();
playlist_changed (ds);
- playlist_change_connection = ds->PlaylistChanged.connect (bind (
- mem_fun (*this, &StreamView::playlist_changed_weak),
- 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
i = tmp;
}
- // Fix canvas layering by raising each in the sorted list order
+ // Fix canvas layering by raising each to the top in the sorted order.
for (RegionViewList::iterator i = copy.begin(); i != copy.end(); ++i) {
- region_layered (*i);
+ (*i)->get_canvas_group()->raise_to_top ();
}
}
StreamView::playlist_modified (boost::shared_ptr<Diskstream> ds)
{
/* we do not allow shared_ptr<T> to be bound to slots */
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_modified_weak), ds));
+ ENSURE_GUI_THREAD (*this, &StreamView::playlist_modified_weak, ds)
/* update layers count and the y positions and heights of our regions */
if (ds->playlist()) {
if (_layer_display == Stacked) {
update_contents_height ();
update_coverage_frames ();
- }
+ } else {
+ /* layering has probably been modified. reflect this in the canvas. */
+ layer_regions();
+ }
}
void
void
StreamView::playlist_changed (boost::shared_ptr<Diskstream> ds)
{
- ENSURE_GUI_THREAD (bind (
- mem_fun (*this, &StreamView::playlist_changed_weak),
- boost::weak_ptr<Diskstream> (ds)));
+ ENSURE_GUI_THREAD (*this, &StreamView::playlist_changed_weak, boost::weak_ptr<Diskstream> (ds));
/* disconnect from old playlist */
- for (vector<sigc::connection>::iterator i = playlist_connections.begin();
- i != playlist_connections.end(); ++i) {
- (*i).disconnect();
- }
-
- playlist_connections.clear();
+ playlist_connections.drop_connections ();
undisplay_diskstream ();
/* update layers count and the y positions and heights of our regions */
/* catch changes */
- playlist_connections.push_back (ds->playlist()->Modified.connect (bind (
- mem_fun (*this, &StreamView::playlist_modified_weak), ds)));
-
- playlist_connections.push_back (ds->playlist()->RegionAdded.connect (
- mem_fun (*this, &StreamView::add_region_view_weak)));
-
- playlist_connections.push_back (ds->playlist()->RegionRemoved.connect (
- mem_fun (*this, &StreamView::remove_region_view)));
+ 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
boost::shared_ptr<Track> t;
if ((t = _trackview.track()) != 0) {
- Gtkmm2ext::UI::instance()->call_slot (bind (
- mem_fun (*this, &StreamView::display_diskstream),
- t->diskstream()));
+ Gtkmm2ext::UI::instance()->call_slot (boost::bind (&StreamView::display_diskstream, this, t->diskstream()));
} else {
- Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::undisplay_diskstream));
+ Gtkmm2ext::UI::instance()->call_slot (boost::bind (&StreamView::undisplay_diskstream, this));
}
}
void
StreamView::rec_enable_changed ()
{
- Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
+ Gtkmm2ext::UI::instance()->call_slot (boost::bind (&StreamView::setup_rec_box, this));
}
void
StreamView::sess_rec_enable_changed ()
{
- Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
+ Gtkmm2ext::UI::instance()->call_slot (boost::bind (&StreamView::setup_rec_box, this));
}
void
StreamView::transport_changed()
{
- Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
+ Gtkmm2ext::UI::instance()->call_slot (boost::bind (&StreamView::setup_rec_box, this));
}
void
{
// to force a new rec region
rec_active = false;
- Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
+ Gtkmm2ext::UI::instance()->call_slot (boost::bind (&StreamView::setup_rec_box, this));
}
void