summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-19 17:37:37 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-19 18:58:29 +0100
commit0f8a8f3b3a5381133fb29fa1d6030bbc14040439 (patch)
tree8346d8d6024f8f030b7f38f2813c8b861f5fb647 /src/wx
parent7b12e1995891da95d898608215cfe7f3e8c3facc (diff)
Add sequence video button.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/film_editor.cc14
-rw-r--r--src/wx/film_editor.h4
2 files changed, 17 insertions, 1 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index 83e8c619f..33f5603a4 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -237,6 +237,7 @@ FilmEditor::connect_to_widgets ()
_audio_stream->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::audio_stream_changed), 0, this);
_subtitle_stream->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::subtitle_stream_changed), 0, this);
_dcp_resolution->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (FilmEditor::dcp_resolution_changed), 0, this);
+ _sequence_video->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::sequence_video_changed), 0, this);
_audio_mapping->Changed.connect (boost::bind (&FilmEditor::audio_mapping_changed, this, _1));
_start->Changed.connect (boost::bind (&FilmEditor::start_changed, this));
@@ -334,6 +335,9 @@ FilmEditor::make_content_panel ()
_content_sizer->Add (s, 0.75, 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);
@@ -666,6 +670,9 @@ FilmEditor::film_changed (Film::Property p)
_audio_mapping->set_channels (_film->dcp_audio_channels ());
setup_dcp_name ();
break;
+ case Film::SEQUENCE_VIDEO:
+ checked_set (_sequence_video, _film->sequence_video ());
+ break;
}
}
@@ -873,6 +880,7 @@ FilmEditor::set_film (shared_ptr<Film> f)
film_changed (Film::DCI_METADATA);
film_changed (Film::DCP_VIDEO_FRAME_RATE);
film_changed (Film::DCP_AUDIO_CHANNELS);
+ film_changed (Film::SEQUENCE_VIDEO);
if (!_film->content().empty ()) {
set_selection (_film->content().front ());
@@ -1502,3 +1510,9 @@ FilmEditor::ratio_changed (wxCommandEvent &)
vc->set_ratio (ratios[n]);
}
}
+
+void
+FilmEditor::sequence_video_changed (wxCommandEvent &)
+{
+ _film->set_sequence_video (_sequence_video->GetValue ());
+}
diff --git a/src/wx/film_editor.h b/src/wx/film_editor.h
index a7e8ab197..7347ab1a6 100644
--- a/src/wx/film_editor.h
+++ b/src/wx/film_editor.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -96,6 +96,7 @@ private:
void ratio_changed (wxCommandEvent &);
void dcp_audio_channels_changed (wxCommandEvent &);
void dcp_resolution_changed (wxCommandEvent &);
+ void sequence_video_changed (wxCommandEvent &);
/* Handle changes to the model */
void film_changed (Film::Property);
@@ -140,6 +141,7 @@ private:
wxButton* _content_earlier;
wxButton* _content_later;
wxButton* _content_timeline;
+ wxCheckBox* _sequence_video;
wxButton* _edit_dci_button;
wxChoice* _ratio;
wxStaticText* _ratio_description;