diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-06-28 16:17:39 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-06-29 11:26:56 +0100 |
| commit | 29377b18a8cef724c8e2de2316a66ceae89a2e9a (patch) | |
| tree | 10bf8a39b26282274382e1d74aefa1603f10711e /src/wx/dcp_panel.cc | |
| parent | cb845fc94ce2015138ddecb6c5a94e722361642a (diff) | |
Offer only flat/scope/full-frame as container choices and differentiate
the names from the UI for content ratios.
Diffstat (limited to 'src/wx/dcp_panel.cc')
| -rw-r--r-- | src/wx/dcp_panel.cc | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index 2888bfb66..91ffe365f 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -175,9 +175,8 @@ DCPPanel::DCPPanel (wxNotebook* n, boost::shared_ptr<Film> film) _standard->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::standard_changed, this)); _upload_after_make_dcp->Bind (wxEVT_CHECKBOX, boost::bind (&DCPPanel::upload_after_make_dcp_changed, this)); - vector<DCPContentType const *> const ct = DCPContentType::all (); - for (vector<DCPContentType const *>::const_iterator i = ct.begin(); i != ct.end(); ++i) { - _dcp_content_type->Append (std_to_wx ((*i)->pretty_name ())); + BOOST_FOREACH (DCPContentType const * i, DCPContentType::all()) { + _dcp_content_type->Append (std_to_wx (i->pretty_name ())); } _reel_type->Append (_("Single reel")); @@ -445,7 +444,7 @@ void DCPPanel::setup_container () { int n = 0; - vector<Ratio const *> ratios = Ratio::all (); + vector<Ratio const *> ratios = Ratio::containers (); vector<Ratio const *>::iterator i = ratios.begin (); while (i != ratios.end() && *i != _film->container ()) { ++i; @@ -474,7 +473,7 @@ DCPPanel::container_changed () int const n = _container->GetSelection (); if (n >= 0) { - vector<Ratio const *> ratios = Ratio::all (); + vector<Ratio const *> ratios = Ratio::containers (); DCPOMATIC_ASSERT (n < int (ratios.size())); _film->set_container (ratios[n]); } @@ -653,6 +652,11 @@ DCPPanel::make_video_panel () ++r; } + add_label_to_sizer (grid, panel, _("Resolution"), true, wxGBPosition (r, 0)); + _resolution = new wxChoice (panel, wxID_ANY); + grid->Add (_resolution, wxGBPosition (r, 1)); + ++r; + add_label_to_sizer (grid, panel, _("Frame Rate"), true, wxGBPosition (r, 0)); { _frame_rate_sizer = new wxBoxSizer (wxHORIZONTAL); @@ -671,11 +675,6 @@ DCPPanel::make_video_panel () grid->Add (_three_d, wxGBPosition (r, 0), wxGBSpan (1, 2)); ++r; - add_label_to_sizer (grid, panel, _("Resolution"), true, wxGBPosition (r, 0)); - _resolution = new wxChoice (panel, wxID_ANY); - grid->Add (_resolution, wxGBPosition (r, 1)); - ++r; - { add_label_to_sizer (grid, panel, _("JPEG2000 bandwidth\nfor newly-encoded data"), true, wxGBPosition (r, 0)); wxSizer* s = new wxBoxSizer (wxHORIZONTAL); @@ -696,14 +695,12 @@ DCPPanel::make_video_panel () _resolution->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::resolution_changed, this)); _three_d->Bind (wxEVT_CHECKBOX, boost::bind (&DCPPanel::three_d_changed, this)); - vector<Ratio const *> const ratio = Ratio::all (); - for (vector<Ratio const *>::const_iterator i = ratio.begin(); i != ratio.end(); ++i) { - _container->Append (std_to_wx ((*i)->nickname ())); + BOOST_FOREACH (Ratio const * i, Ratio::containers()) { + _container->Append (std_to_wx(i->container_nickname())); } - list<int> const dfr = Config::instance()->allowed_dcp_frame_rates (); - for (list<int>::const_iterator i = dfr.begin(); i != dfr.end(); ++i) { - _frame_rate_choice->Append (std_to_wx (boost::lexical_cast<string> (*i))); + BOOST_FOREACH (int i, Config::instance()->allowed_dcp_frame_rates()) { + _frame_rate_choice->Append (std_to_wx (boost::lexical_cast<string> (i))); } _j2k_bandwidth->SetRange (1, Config::instance()->maximum_j2k_bandwidth() / 1000000); |
