BOOST_FOREACH.
[dcpomatic.git] / src / wx / dcp_panel.cc
index 9322e68cfd4dc7199a67e8efcc4beb477595218c..5d941301bcb75865b8c2b545aa5bd46d20d22d4c 100644 (file)
@@ -47,7 +47,6 @@
 #include <wx/gbsizer.h>
 #include <wx/spinctrl.h>
 #include <boost/lexical_cast.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::cout;
@@ -58,8 +57,8 @@ using std::pair;
 using std::max;
 using std::make_pair;
 using boost::lexical_cast;
-using boost::shared_ptr;
-using boost::weak_ptr;
+using std::shared_ptr;
+using std::weak_ptr;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
 #endif
@@ -137,7 +136,7 @@ DCPPanel::DCPPanel (wxNotebook* n, shared_ptr<Film> film, weak_ptr<FilmViewer> v
        _markers->Bind               (wxEVT_BUTTON,   boost::bind (&DCPPanel::markers_clicked, this));
        _metadata->Bind              (wxEVT_BUTTON,   boost::bind (&DCPPanel::metadata_clicked, this));
 
-       BOOST_FOREACH (DCPContentType const * i, DCPContentType::all()) {
+       for (auto i: DCPContentType::all()) {
                _dcp_content_type->Append (std_to_wx (i->pretty_name ()));
        }
 
@@ -380,6 +379,7 @@ DCPPanel::film_changed (int p)
                break;
        }
        case Film::ISDCF_METADATA:
+       case Film::SUBTITLE_LANGUAGES:
                setup_dcp_name ();
                break;
        case Film::VIDEO_FRAME_RATE:
@@ -745,11 +745,11 @@ DCPPanel::make_video_panel ()
        _three_d->Bind           (wxEVT_CHECKBOX, boost::bind(&DCPPanel::three_d_changed, this));
        _reencode_j2k->Bind      (wxEVT_CHECKBOX, boost::bind(&DCPPanel::reencode_j2k_changed, this));
 
-       BOOST_FOREACH (Ratio const * i, Ratio::containers()) {
+       for (auto i: Ratio::containers()) {
                _container->Append (std_to_wx(i->container_nickname()));
        }
 
-       BOOST_FOREACH (int i, Config::instance()->allowed_dcp_frame_rates()) {
+       for (auto i: Config::instance()->allowed_dcp_frame_rates()) {
                _frame_rate_choice->Append (std_to_wx (boost::lexical_cast<string> (i)));
        }
 
@@ -797,9 +797,9 @@ DCPPanel::add_video_panel_to_grid ()
 
        add_label_to_sizer (_video_grid, _j2k_bandwidth_label, true, wxGBPosition (r, 0));
        wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
-       s->Add (_j2k_bandwidth, 1);
-       add_label_to_sizer (s, _mbits_label, false);
-       _video_grid->Add (s, wxGBPosition (r, 1));
+       s->Add (_j2k_bandwidth, 0, wxALIGN_CENTER_VERTICAL);
+       add_label_to_sizer (s, _mbits_label, false, 0, wxALIGN_CENTER_VERTICAL);
+       _video_grid->Add (s, wxGBPosition(r, 1), wxDefaultSpan, wxEXPAND);
        ++r;
        _video_grid->Add (_reencode_j2k, wxGBPosition(r, 0), wxGBSpan(1, 2));
 }
@@ -922,7 +922,7 @@ void
 DCPPanel::add_audio_processors ()
 {
        _audio_processor->Append (_("None"), new wxStringClientData (N_("none")));
-       BOOST_FOREACH (AudioProcessor const * ap, AudioProcessor::visible()) {
+       for (auto ap: AudioProcessor::visible()) {
                _audio_processor->Append (std_to_wx(ap->name()), new wxStringClientData(std_to_wx(ap->id())));
        }
        _audio_panel_sizer->Layout();