summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wx/film_editor.cc21
-rw-r--r--src/wx/film_editor.h2
-rw-r--r--src/wx/timeline_dialog.cc31
-rw-r--r--src/wx/timeline_dialog.h4
4 files changed, 37 insertions, 21 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index e73b27267..275a7ab81 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -255,7 +255,6 @@ FilmEditor::connect_to_widgets ()
_audio_channels->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&FilmEditor::audio_channels_changed, this));
_j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&FilmEditor::j2k_bandwidth_changed, this));
_resolution->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&FilmEditor::resolution_changed, this));
- _sequence_video->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&FilmEditor::sequence_video_changed, this));
_three_d->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&FilmEditor::three_d_changed, this));
_standard->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&FilmEditor::standard_changed, this));
}
@@ -295,9 +294,6 @@ FilmEditor::make_content_panel ()
_content_sizer->Add (s, 0, wxEXPAND | wxALL, 6);
}
- _sequence_video = new wxCheckBox (_content_panel, wxID_ANY, _("Keep video in sequence"));
- _content_sizer->Add (_sequence_video);
-
_content_notebook = new wxNotebook (_content_panel, wxID_ANY);
_content_sizer->Add (_content_notebook, 1, wxEXPAND | wxTOP, 6);
@@ -503,9 +499,6 @@ FilmEditor::film_changed (Film::Property p)
checked_set (_audio_channels, _film->audio_channels ());
setup_dcp_name ();
break;
- case Film::SEQUENCE_VIDEO:
- checked_set (_sequence_video, _film->sequence_video ());
- break;
case Film::THREE_D:
checked_set (_three_d, _film->three_d ());
setup_dcp_name ();
@@ -513,6 +506,8 @@ FilmEditor::film_changed (Film::Property p)
case Film::INTEROP:
checked_set (_standard, _film->interop() ? 1 : 0);
break;
+ default:
+ break;
}
}
@@ -630,7 +625,6 @@ FilmEditor::set_film (shared_ptr<Film> f)
film_changed (Film::ISDCF_METADATA);
film_changed (Film::VIDEO_FRAME_RATE);
film_changed (Film::AUDIO_CHANNELS);
- film_changed (Film::SEQUENCE_VIDEO);
film_changed (Film::THREE_D);
film_changed (Film::INTEROP);
@@ -672,7 +666,6 @@ FilmEditor::set_general_sensitivity (bool s)
_j2k_bandwidth->Enable (s);
_container->Enable (s);
_best_frame_rate->Enable (s && _film && _film->best_video_frame_rate () != _film->video_frame_rate ());
- _sequence_video->Enable (s);
_resolution->Enable (s);
_scaler->Enable (s);
_three_d->Enable (s);
@@ -1013,16 +1006,6 @@ FilmEditor::set_selection (weak_ptr<Content> wc)
}
void
-FilmEditor::sequence_video_changed ()
-{
- if (!_film) {
- return;
- }
-
- _film->set_sequence_video (_sequence_video->GetValue ());
-}
-
-void
FilmEditor::content_right_click (wxListEvent& ev)
{
_menu.popup (_film, selected_content (), ev.GetPoint ());
diff --git a/src/wx/film_editor.h b/src/wx/film_editor.h
index ba9ff6fa0..d66668a61 100644
--- a/src/wx/film_editor.h
+++ b/src/wx/film_editor.h
@@ -96,7 +96,6 @@ private:
void content_timeline_clicked ();
void audio_channels_changed ();
void resolution_changed ();
- void sequence_video_changed ();
void content_right_click (wxListEvent &);
void three_d_changed ();
void standard_changed ();
@@ -144,7 +143,6 @@ private:
wxButton* _content_earlier;
wxButton* _content_later;
wxButton* _content_timeline;
- wxCheckBox* _sequence_video;
wxButton* _edit_isdcf_button;
wxChoice* _scaler;
wxSpinCtrl* _j2k_bandwidth;
diff --git a/src/wx/timeline_dialog.cc b/src/wx/timeline_dialog.cc
index dbf7ae232..bc3e8db99 100644
--- a/src/wx/timeline_dialog.cc
+++ b/src/wx/timeline_dialog.cc
@@ -30,6 +30,7 @@ using boost::shared_ptr;
TimelineDialog::TimelineDialog (FilmEditor* ed, shared_ptr<Film> film)
: wxDialog (ed, wxID_ANY, _("Timeline"), wxDefaultPosition, wxSize (640, 512), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE)
+ , _film (film)
, _timeline (this, ed, film)
{
wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
@@ -37,6 +38,8 @@ TimelineDialog::TimelineDialog (FilmEditor* ed, shared_ptr<Film> film)
wxBoxSizer* controls = new wxBoxSizer (wxHORIZONTAL);
_snap = new wxCheckBox (this, wxID_ANY, _("Snap"));
controls->Add (_snap);
+ _sequence_video = new wxCheckBox (this, wxID_ANY, _("Keep video in sequence"));
+ controls->Add (_sequence_video, 1, wxLEFT, 12);
sizer->Add (controls, 0, wxALL, 12);
sizer->Add (&_timeline, 1, wxEXPAND | wxALL, 12);
@@ -47,6 +50,10 @@ TimelineDialog::TimelineDialog (FilmEditor* ed, shared_ptr<Film> film)
_snap->SetValue (_timeline.snap ());
_snap->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&TimelineDialog::snap_toggled, this));
+ film_changed (Film::SEQUENCE_VIDEO);
+ _snap->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&TimelineDialog::sequence_video_toggled, this));
+
+ film->Changed.connect (bind (&TimelineDialog::film_changed, this, _1));
}
void
@@ -54,3 +61,27 @@ TimelineDialog::snap_toggled ()
{
_timeline.set_snap (_snap->GetValue ());
}
+
+void
+TimelineDialog::sequence_video_toggled ()
+{
+ shared_ptr<Film> film = _film.lock ();
+ if (!film) {
+ return;
+ }
+
+ film->set_sequence_video (_sequence_video->GetValue ());
+}
+
+void
+TimelineDialog::film_changed (Film::Property p)
+{
+ shared_ptr<Film> film = _film.lock ();
+ if (!film) {
+ return;
+ }
+
+ if (p == Film::SEQUENCE_VIDEO) {
+ _sequence_video->SetValue (film->sequence_video ());
+ }
+}
diff --git a/src/wx/timeline_dialog.h b/src/wx/timeline_dialog.h
index 1e5955003..19a7ffade 100644
--- a/src/wx/timeline_dialog.h
+++ b/src/wx/timeline_dialog.h
@@ -31,7 +31,11 @@ public:
private:
void snap_toggled ();
+ void sequence_video_toggled ();
+ void film_changed (Film::Property);
+ boost::weak_ptr<Film> _film;
Timeline _timeline;
wxCheckBox* _snap;
+ wxCheckBox* _sequence_video;
};