Remove reel type / length controls from DCP panel.
authorCarl Hetherington <cth@carlh.net>
Sat, 16 Dec 2023 22:23:58 +0000 (23:23 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 11 Mar 2024 23:43:51 +0000 (00:43 +0100)
src/wx/dcp_panel.cc
src/wx/dcp_panel.h

index b789a1a74ec96da172442be064ab28b3b0c03f1d..1afc1be3dd9ab251c79ae49f2c478caebee6614b 100644 (file)
@@ -106,13 +106,6 @@ DCPPanel::DCPPanel(wxNotebook* n, shared_ptr<Film> film, FilmViewer& viewer)
         auto size = dc.GetTextExtent (wxT ("GGGGGGGG..."));
         size.SetHeight (-1);
 
-       _reels_label = create_label (_panel, _("Reels"), true);
-       _reel_type = new Choice(_panel);
-
-       _reel_length_label = create_label (_panel, _("Reel length"), true);
-       _reel_length = new SpinCtrl (_panel, DCPOMATIC_SPIN_CTRL_WIDTH);
-       _reel_length_gb_label = create_label (_panel, _("GB"), false);
-
        _standard_label = create_label (_panel, _("Standard"), true);
        _standard = new Choice(_panel);
 
@@ -130,8 +123,6 @@ DCPPanel::DCPPanel(wxNotebook* n, shared_ptr<Film> film, FilmViewer& viewer)
        _copy_isdcf_name_button->Bind(wxEVT_BUTTON,   boost::bind(&DCPPanel::copy_isdcf_name_button_clicked, this));
        _dcp_content_type->Bind      (wxEVT_CHOICE,   boost::bind(&DCPPanel::dcp_content_type_changed, this));
        _encrypted->bind(&DCPPanel::encrypted_toggled, this);
-       _reel_type->Bind             (wxEVT_CHOICE,   boost::bind(&DCPPanel::reel_type_changed, this));
-       _reel_length->Bind           (wxEVT_SPINCTRL, boost::bind(&DCPPanel::reel_length_changed, this));
        _standard->Bind              (wxEVT_CHOICE,   boost::bind(&DCPPanel::standard_changed, this));
        _markers->Bind               (wxEVT_BUTTON,   boost::bind(&DCPPanel::markers_clicked, this));
        _metadata->Bind              (wxEVT_BUTTON,   boost::bind(&DCPPanel::metadata_clicked, this));
@@ -139,13 +130,6 @@ DCPPanel::DCPPanel(wxNotebook* n, shared_ptr<Film> film, FilmViewer& viewer)
                _dcp_content_type->add(i->pretty_name());
        }
 
-       _reel_type->add(_("Single reel"));
-       _reel_type->add(_("Split by video content"));
-       _reel_type->add(S_("Split by maximum reel size"));
-       _reel_type->SetToolTip(_("How the DCP should be split into parts internally.  If in doubt, choose 'Single reel'"));
-
-       _reel_length->SetRange (1, 64);
-
        add_standards();
        _standard->SetToolTip(_("The standard that the DCP should use.  Interop is older, and SMPTE is the newer (current) standard.  If in doubt, choose 'SMPTE'"));
 
@@ -240,19 +224,6 @@ DCPPanel::add_to_grid ()
        _grid->Add (_encrypted, wxGBPosition(r, 0), wxGBSpan(1, 2));
        ++r;
 
-       add_label_to_sizer (_grid, _reels_label, true, wxGBPosition(r, 0));
-       _grid->Add (_reel_type, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
-       ++r;
-
-       add_label_to_sizer (_grid, _reel_length_label, true, wxGBPosition(r, 0));
-       {
-               auto s = new wxBoxSizer (wxHORIZONTAL);
-               s->Add (_reel_length);
-               add_label_to_sizer (s, _reel_length_gb_label, false, 0, wxLEFT | wxALIGN_CENTER_VERTICAL);
-               _grid->Add (s, wxGBPosition(r, 1));
-       }
-       ++r;
-
        add_label_to_sizer (_grid, _standard_label, true, wxGBPosition(r, 0));
        _grid->Add (_standard, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
        ++r;
@@ -473,13 +444,6 @@ DCPPanel::film_changed(FilmProperty p)
                setup_audio_channels_choice (_audio_channels, minimum_allowed_audio_channels());
                film_changed (FilmProperty::AUDIO_CHANNELS);
                break;
-       case FilmProperty::REEL_TYPE:
-               checked_set (_reel_type, static_cast<int>(_film->reel_type()));
-               _reel_length->Enable (_film->reel_type() == ReelType::BY_LENGTH);
-               break;
-       case FilmProperty::REEL_LENGTH:
-               checked_set (_reel_length, _film->reel_length() / 1000000000LL);
-               break;
        case FilmProperty::CONTENT:
                setup_dcp_name ();
                setup_sensitivity ();
@@ -665,8 +629,6 @@ DCPPanel::setup_sensitivity ()
        _audio_language->Enable         (_enable_audio_language->GetValue());
        _edit_audio_language->Enable    (_enable_audio_language->GetValue());
        _encrypted->Enable              (_generally_sensitive);
-       _reel_type->Enable              (_generally_sensitive && _film && !_film->references_dcp_video() && !_film->references_dcp_audio());
-       _reel_length->Enable            (_generally_sensitive && _film && _film->reel_type() == ReelType::BY_LENGTH);
        _markers->Enable                (_generally_sensitive && _film && !_film->interop());
        _metadata->Enable               (_generally_sensitive);
        _frame_rate_choice->Enable      (_generally_sensitive && _film && !_film->references_dcp_video() && !_film->contains_atmos_content());
@@ -1031,28 +993,6 @@ DCPPanel::show_audio_clicked ()
 }
 
 
-void
-DCPPanel::reel_type_changed ()
-{
-       if (!_film || !_reel_type->get()) {
-               return;
-       }
-
-       _film->set_reel_type(static_cast<ReelType>(*_reel_type->get()));
-}
-
-
-void
-DCPPanel::reel_length_changed ()
-{
-       if (!_film) {
-               return;
-       }
-
-       _film->set_reel_length (_reel_length->GetValue() * 1000000000LL);
-}
-
-
 void
 DCPPanel::add_audio_processors ()
 {
index 849fe185cf836bc588428c9308dd928db014226b..a5af589218c657520a9ccea37798c7238b13bb1a 100644 (file)
@@ -82,8 +82,6 @@ private:
        void encrypted_toggled ();
        void audio_processor_changed ();
        void show_audio_clicked ();
-       void reel_type_changed ();
-       void reel_length_changed ();
        void markers_clicked ();
        void metadata_clicked ();
        void reencode_j2k_changed ();
@@ -153,11 +151,6 @@ private:
        wxStaticText* _standard_label;
        Choice* _standard;
        CheckBox* _encrypted;
-       wxStaticText* _reels_label;
-       Choice* _reel_type;
-       wxStaticText* _reel_length_label;
-       wxStaticText* _reel_length_gb_label;
-       wxSpinCtrl* _reel_length;
        wxButton* _markers;
        wxButton* _metadata;
        wxSizer* _audio_panel_sizer;