Build fixes for Boost >= 1.73
[dcpomatic.git] / src / wx / dcp_panel.cc
index a01db9be3f4add19090834bb9d90780ddf8e8a98..9f868f9f4c210e2e0bbfb40277fdc2b134c06184 100644 (file)
@@ -58,6 +58,9 @@ using std::max;
 using std::make_pair;
 using boost::lexical_cast;
 using boost::shared_ptr;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
 using dcp::locale_convert;
 
 DCPPanel::DCPPanel (wxNotebook* n, boost::shared_ptr<Film> film)
@@ -307,9 +310,10 @@ DCPPanel::frame_rate_choice_changed ()
        }
 
        _film->set_video_frame_rate (
-               boost::lexical_cast<int> (
-                       wx_to_std (_frame_rate_choice->GetString (_frame_rate_choice->GetSelection ()))
-                       )
+               boost::lexical_cast<int>(
+                       wx_to_std(_frame_rate_choice->GetString(_frame_rate_choice->GetSelection()))
+                       ),
+               true
                );
 }
 
@@ -565,6 +569,13 @@ DCPPanel::set_film (shared_ptr<Film> film)
 
        _film = film;
 
+       if (!_film) {
+               /* Really should all the film_changed below but this might be enough */
+               checked_set (_dcp_name, wxT(""));
+               set_general_sensitivity (false);
+               return;
+       }
+
        film_changed (Film::NAME);
        film_changed (Film::USE_ISDCF_NAME);
        film_changed (Film::CONTENT);
@@ -628,6 +639,8 @@ DCPPanel::setup_sensitivity ()
        _resolution->Enable             (_generally_sensitive && _film && !_film->references_dcp_video());
        _three_d->Enable                (_generally_sensitive && _film && !_film->references_dcp_video());
        _standard->Enable               (_generally_sensitive && _film && !_film->references_dcp_video() && !_film->references_dcp_audio());
+       _reencode_j2k->Enable           (_generally_sensitive && _film);
+       _show_audio->Enable             (_generally_sensitive && _film);
 }
 
 void