X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwx%2Fwx_util.cc;h=05f2db121ac69496ce828c828929820ad1db65d7;hb=69829c8c664d301de3f123f9893210eea89d8026;hp=40e72543a7e374495057f8872c792b68f1ed71e8;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 40e72543a..05f2db121 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington + Copyright (C) 2012-2016 Carl Hetherington This file is part of DCP-o-matic. @@ -26,11 +26,13 @@ #include "file_picker_ctrl.h" #include "lib/config.h" #include "lib/util.h" +#include #include #include using namespace std; using namespace boost; +using dcp::locale_convert; /** Add a wxStaticText to a wxSizer, aligning it at vertical centre. * @param s Sizer to add to. @@ -357,3 +359,26 @@ time_to_timecode (DCPTime t, double fps) int const f = lrint (w * fps); return wxString::Format (wxT("%02d:%02d:%02d.%02d"), h, m, s, f); } + +void +setup_audio_channels_choice (wxChoice* choice, int minimum) +{ + vector > items; + for (int i = minimum; i <= 16; i += 2) { + if (i == 2) { + items.push_back (make_pair (wx_to_std (_("2 - stereo")), locale_convert (i))); + } else if (i == 4) { + items.push_back (make_pair (wx_to_std (_("4 - L/C/R/Lfe")), locale_convert (i))); + } else if (i == 6) { + items.push_back (make_pair (wx_to_std (_("6 - 5.1")), locale_convert (i))); + } else if (i == 8) { + items.push_back (make_pair (wx_to_std (_("8 - 5.1/HI/VI")), locale_convert (i))); + } else if (i == 12) { + items.push_back (make_pair (wx_to_std (_("12 - 7.1/HI/VI")), locale_convert (i))); + } else { + items.push_back (make_pair (locale_convert (i), locale_convert (i))); + } + } + + checked_set (choice, items); +}