, region_color(_trackview.color())
, stream_base_color(0xFFFFFFFF)
, _layers (1)
- , height(tv.height)
, _layer_display (Overlaid)
+ , height(tv.height)
, last_rec_data_frame(0)
{
/* set_position() will position the group */
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, &_trackview));
+ canvas_rect->signal_event().connect (bind (
+ 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 (
+ 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));
}
ColorsChanged.connect (mem_fun (*this, &StreamView::color_handler));
{
playlist_change_connection.disconnect();
playlist_changed (ds);
- playlist_change_connection = ds->PlaylistChanged.connect (bind (mem_fun (*this, &StreamView::playlist_changed), ds));
-}
-
-void
-StreamView::playlist_modified_weak (boost::weak_ptr<Diskstream> ds)
-{
- boost::shared_ptr<Diskstream> sp (ds.lock());
- if (!sp) {
- return;
- }
-
- playlist_modified (sp);
+ playlist_change_connection = ds->PlaylistChanged.connect (bind (
+ mem_fun (*this, &StreamView::playlist_changed_weak),
+ boost::weak_ptr<Diskstream> (ds)));
}
void
}
}
+void
+StreamView::playlist_modified_weak (boost::weak_ptr<Diskstream> ds)
+{
+ boost::shared_ptr<Diskstream> sp (ds.lock());
+ if (sp) {
+ playlist_modified (sp);
+ }
+}
+
void
StreamView::playlist_modified (boost::shared_ptr<Diskstream> ds)
{
}
}
+void
+StreamView::playlist_changed_weak (boost::weak_ptr<Diskstream> ds)
+{
+ boost::shared_ptr<Diskstream> sp (ds.lock());
+ if (sp) {
+ playlist_changed (sp);
+ }
+}
+
void
StreamView::playlist_changed (boost::shared_ptr<Diskstream> ds)
{
- /* XXX: binding to a shared_ptr, is this ok? */
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_changed), ds));
+ ENSURE_GUI_THREAD (bind (
+ mem_fun (*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) {
+ for (vector<sigc::connection>::iterator i = playlist_connections.begin();
+ i != playlist_connections.end(); ++i) {
(*i).disconnect();
}
/* 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()->Modified.connect (bind (
+ mem_fun (*this, &StreamView::playlist_modified_weak),
+ ds)));
}
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 (bind (
+ mem_fun (*this, &StreamView::display_diskstream),
+ t->diskstream()));
} else {
Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::undisplay_diskstream));
}