Remove film player, DVD ripping, alignment, screen configs; never finished and not...
[dcpomatic.git] / src / wx / film_editor.cc
index e2a31d8d4244d625414c2617e0022a186dc5a240..67cd17d4ada9449a91acee724ef52aeae1871cbe 100644 (file)
@@ -34,7 +34,6 @@
 #include "lib/ab_transcode_job.h"
 #include "lib/job_manager.h"
 #include "lib/filter.h"
-#include "lib/screen.h"
 #include "lib/config.h"
 #include "filter_dialog.h"
 #include "wx_util.h"
@@ -57,6 +56,7 @@ using boost::shared_ptr;
 FilmEditor::FilmEditor (shared_ptr<Film> f, wxWindow* parent)
        : wxPanel (parent)
        , _film (f)
+       , _generally_sensitive (true)
 {
        _sizer = new wxFlexGridSizer (2, 4, 4);
        SetSizer (_sizer);
@@ -506,6 +506,7 @@ FilmEditor::film_changed (Film::Property p)
                break;
        case Film::WITH_SUBTITLES:
                checked_set (_with_subtitles, _film->with_subtitles ());
+               _subtitle_stream->Enable (_film->with_subtitles ());
                _subtitle_scale->Enable (_film->with_subtitles ());
                _subtitle_offset->Enable (_film->with_subtitles ());
                _dcp_name->SetLabel (std_to_wx (_film->dcp_name ()));
@@ -612,6 +613,8 @@ FilmEditor::set_film (shared_ptr<Film> f)
 void
 FilmEditor::set_things_sensitive (bool s)
 {
+       _generally_sensitive = s;
+       
        _name->Enable (s);
        _use_dci_name->Enable (s);
        _edit_dci_button->Enable (s);
@@ -812,7 +815,11 @@ FilmEditor::with_subtitles_toggled (wxCommandEvent &)
 void
 FilmEditor::setup_subtitle_control_sensitivity ()
 {
-       bool const h = _film ? _film->has_subtitles() : false;
+       bool h = false;
+       if (_generally_sensitive && _film) {
+               h = _film->has_subtitles();
+       }
+       
        _with_subtitles->Enable (h);
        _subtitle_stream->Enable (h);
        _subtitle_offset->Enable (h);