+
+ _snap->SetValue (_timeline.snap ());
+ _snap->Bind (wxEVT_CHECKBOX, boost::bind (&TimelineDialog::snap_toggled, this));
+ film_changed (Film::SEQUENCE);
+ _sequence->Bind (wxEVT_CHECKBOX, boost::bind (&TimelineDialog::sequence_toggled, this));
+
+ _film_changed_connection = film->Changed.connect (bind (&TimelineDialog::film_changed, this, _1));
+}
+
+void
+TimelineDialog::snap_toggled ()
+{
+ _timeline.set_snap (_snap->GetValue ());
+}
+
+void
+TimelineDialog::sequence_toggled ()
+{
+ shared_ptr<Film> film = _film.lock ();
+ if (!film) {
+ return;
+ }
+
+ film->set_sequence (_sequence->GetValue ());
+}
+
+void
+TimelineDialog::film_changed (Film::Property p)
+{
+ shared_ptr<Film> film = _film.lock ();
+ if (!film) {
+ return;
+ }
+
+ if (p == Film::SEQUENCE) {
+ _sequence->SetValue (film->sequence ());
+ }
+}
+
+void
+TimelineDialog::set_selection (ContentList selection)
+{
+ _timeline.set_selection (selection);