From 3b9be2ddfbfbb8ad0ae591ae90d93835ea42bf9f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 28 Feb 2023 21:45:23 +0100 Subject: [PATCH] Move some settings to new non-standard page. --- .../osx/preferences/non_standard@2x_black.png | Bin 0 -> 2480 bytes .../osx/preferences/non_standard@2x_white.png | Bin 0 -> 2470 bytes .../osx/preferences/non_standard_black.png | Bin 0 -> 1337 bytes .../osx/preferences/non_standard_white.png | Bin 0 -> 1348 bytes graphics/src/preferences_black.svg | 114 +++++++---- graphics/src/preferences_white.svg | 130 +++++++++---- graphics/update | 2 +- platform/osx/make_dmg.sh | 1 + src/wx/full_config_dialog.cc | 179 +++++++++++------- 9 files changed, 288 insertions(+), 138 deletions(-) create mode 100644 graphics/osx/preferences/non_standard@2x_black.png create mode 100644 graphics/osx/preferences/non_standard@2x_white.png create mode 100644 graphics/osx/preferences/non_standard_black.png create mode 100644 graphics/osx/preferences/non_standard_white.png diff --git a/graphics/osx/preferences/non_standard@2x_black.png b/graphics/osx/preferences/non_standard@2x_black.png new file mode 100644 index 0000000000000000000000000000000000000000..8c4c8f3b37881f1106e0775e647b0a9a3ea4961b GIT binary patch literal 2480 zcmV;h2~YNkP)2Do;Y;aFQ@i?t$N<6guI+^aJAjIbc9mk%WYaZK1~9gFDv)T5 zS15PrijJUeOg8Cuw+LPk(dBE1?S;K8${=5_-L>7l02f%0ftl&WnWG5j%;y;}>Hd>R z&YAb?dH(19dY<=rO;Sq!pJCo;0X7;x5wOt$Y&15lXJbN$R3H}+Kq`Bq)UV1yBx@07by|FpEmS1@rNAY+(E35PZkASd<>AEpHF>#JqHdP2>GQWh0o`stE-E~#>SOI+yzd>GHFIlfDqzWz?Xn6B_)Nr zx;h*V2Z@P^(aI7QmX?-qI-N8%H8DRw4=@ZIl~VpIn);$5KnU?6&BU+Q>RV=Sb@I^A@)X6 zN7w`e#(W20J$dpZjg5_lPju11WHNE_;zep|Y5*+2mqLhLVV4hQ4hYQl{{(E6m6c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@`}^j- z{q}n^-w?(aE)v{@vI8hOPcWsF18@yMizG=lp69IqplMo2QIr6H*8tWTW4h5biIGo0 zDZNxuQZfqQZh3h*vD@v%)z#JJ%F0RrKsX%6_V#w%@ApS{c6N>kA@i!LK4Of$`%eNW zr5w-mUvV5a)ZN`(G%zqwY_(eRE*J`hFgZCH^?JQW0KPjoIQX71mN>TnN@=MiNelJ$ z^-VJ~Ga{w5(92{X7!0Dfw^!ZT+WIvTiG0BrQ*y=SY{C=rx1F7x%}Yy5=Ozb$nwlD{ ztgMLb?d_jRlJqB~R5B!hQp!n^wBT?!s@!h3U^bi2O`e3=Y=+0<5js0NX<1p>!bub7 z7a$12PA*4EZOJZ-hm(h`2TcMtl}5kLq&dGZ8TZr?teoa1o)*)!DMx|I2CIdM-=Eg9jjl zK-YCcXKIVC{Tv`{!4F1SFt&j}$Q9G9~(&q6pHMl>1?W(iOfMc&@t zjvFFRHr)6)Zg@Orx+51DW7_`yzMLfhz-zzXA2m#V^34lb^fdf_e+gwvgZfIy2Sy@?0orqgrFTimHPr@YRg$0ySit@%r0Dz`xu-onG#>U3Co12?Ij?VB+_!7-M=Q68UmWWan0dysIn~Q3d@T?AOO4FuKNA{pA|*9 z#u!s`#T6RM3D5I`9LJ4xb#)c>_xBguY_`0_vMgg_Vj|}A`QnL0;!!LX8_#!9F?unv zh@v>E>-t@b#Zu&OI0Q;*#>FHQ3TdmWtFhhP-9rFBs;c^!G4@ZPwG9bK6GCu2OeC*n vH2|P#T2N6G8OJ-^+xLDo`#*8vx8r{S^ciuFApi9x00000NkvXXu0mjfD!y_C literal 0 HcmV?d00001 diff --git a/graphics/osx/preferences/non_standard_white.png b/graphics/osx/preferences/non_standard_white.png new file mode 100644 index 0000000000000000000000000000000000000000..311ccb93b4b6164c51c9ebaa3328f9160af145e7 GIT binary patch literal 1348 zcmV-K1-tr*P)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11kp)E zK~z|U#g|P?8%G$1-yNG>*j)>m;x$%DHbyFn0yX8>ShV^lPO?~^=g_HGz`Oc>((v)&Ye5_>gp<@(I@~wQ55+7e(c+~ z&+O^xF$F=0%CbC2DV=>H0LEBDGMNmis@gU>Iw~(LEI7)ltE&rV&z?`udMU zLqpQ-+qb#La^9xy?(WRFbLUcmAiP2;{k;gZgn6A|7~fyIbVVvbhvjtH1HaGEhIGls%ktBTN_ZL89&3p6A-;G3Y*E9Cb$O-;=~ z##nW!3LIKqUN+S{Y9|m*%>h7FRjjP6m;kzq0MhC7%ZrPPa#61`5a<2=+?-c3&uVdT z(PP{8OGN;NVbHa;wX#2_?GT40sbJ14nFByH8YP;hH5UO`memxC#maWhLc9}+U?Y>s z#mr0wryZCBz{7_RVOiF*MF515N1`ZJ9Dr~f-l(mGkhdIpj>DT?ucLiJk|elXu0#=l zAPCIo^Hnq-s;|dUj|Tvt+BOnf|An&(AFffpk zBBwv zPtk#dG4^UAk+|O1*C(#6tpNa9c^;W911F+9kH0MoiLGiVih`-BDZRF~_86sfZpR7$ z0HyS%D2f+?!JwAi7gkKuu{i)R)6AKRqKGS3uIPdw3~x6t2><{*&kqLzfv>JzyQT#K z0msJM)zs94si`Tgp`qc+wzjsBQfc-P0Hmd2grFuw#HckVC0ds=unL>PS2ux5MGE9f?GE0BCG%Gy{PE@p`>vb8~Y>mgR|3 z^Zi5sc_1zT?EsnpG;W0>0R95-8>Q6QJpEUI|65P}cKi>O5LSP6{2D?40000 + width="8.4666796mm" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + inkscape:snap-bbox="true" + inkscape:deskcolor="#e1e1e1"> + id="guide1238" + inkscape:locked="false" /> + id="guide1240" + inkscape:locked="false" /> + id="guide1257" + inkscape:locked="false" /> + id="guide1289" + inkscape:locked="false" /> + position="33.866655,-55.42847" + inkscape:locked="false" /> + position="25.399995,-46.96181" + inkscape:locked="false" /> + + @@ -278,7 +295,6 @@ style="display:inline" transform="translate(-221.81526,-142.13316)"> diff --git a/graphics/src/preferences_white.svg b/graphics/src/preferences_white.svg index d1f84e7d5..5aba54740 100644 --- a/graphics/src/preferences_white.svg +++ b/graphics/src/preferences_white.svg @@ -1,7 +1,7 @@ + inkscape:snap-bbox="true" + inkscape:deskcolor="#212121"> + id="guide1238" + inkscape:locked="false" /> + id="guide1240" + inkscape:locked="false" /> + id="guide1257" + inkscape:locked="false" /> + id="guide1289" + inkscape:locked="false" /> + position="33.866655,-55.42847" + inkscape:locked="false" /> + position="25.399995,-46.96181" + inkscape:locked="false" /> + + + + @@ -275,7 +302,8 @@ inkscape:groupmode="layer" inkscape:label="Old" style="display:inline" - transform="translate(-221.81526,-142.13316)"> + transform="translate(-221.81526,-142.13316)" + sodipodi:insensitive="true"> + style="fill:#333333;stroke:#ffffff;stroke-width:0.230636;stroke-miterlimit:4;stroke-dasharray:none"> + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#ff5555;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1" /> + style="font-variation-settings:normal;display:inline;vector-effect:none;fill:#333333;fill-opacity:1;stroke:#ffffff;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000" /> + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:#ff5555;fill-opacity:1;stroke:#ff5555;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1" /> + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:#ff5555;fill-opacity:1;stroke:#ff5555;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1" /> + + style="font-variation-settings:normal;display:inline;vector-effect:none;fill:#333333;fill-opacity:1;stroke:#ffffff;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000" /> @@ -729,10 +763,10 @@ sodipodi:nodetypes="ccc" id="path4309-3-6" d="m 123.0911,148.08756 -1.36064,1.74783 -0.66542,-0.57233" - style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#ff5555;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1;-inkscape-stroke:none" /> + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#ff5555;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1" /> + + + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:0.528902;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1" /> + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:0.528902;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1" /> + + + diff --git a/graphics/update b/graphics/update index ff3baca04..005bcf3fd 100755 --- a/graphics/update +++ b/graphics/update @@ -81,7 +81,7 @@ else # OS X preferences icons mkdir -p osx/preferences for c in black white; do - for i in defaults email kdm_email cover_sheet keys tms notifications locations sound identifiers servers general advanced; do + for i in defaults email kdm_email cover_sheet keys tms notifications locations sound identifiers servers general advanced non_standard; do inkbatch --inkscape $INKSCAPE -i bounds-$i -o osx/preferences/${i}_${c}.png --width 32 --height 32 src/preferences_$c.svg inkbatch --inkscape $INKSCAPE -i bounds-$i -o osx/preferences/${i}@2x_${c}.png --width 64 --height 64 src/preferences_$c.svg done diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh index 087e8b936..7b2f330a2 100644 --- a/platform/osx/make_dmg.sh +++ b/platform/osx/make_dmg.sh @@ -237,6 +237,7 @@ function copy_resources { cp $prefix/src/dcpomatic/graphics/osx/preferences/general*.png "$dest" cp $prefix/src/dcpomatic/graphics/osx/preferences/advanced*.png "$dest" cp $prefix/src/dcpomatic/graphics/osx/preferences/locations*.png "$dest" + cp $prefix/src/dcpomatic/graphics/osx/preferences/non_standard*.png "$dest" cp $prefix/src/dcpomatic/fonts/LiberationSans-Regular.ttf "$dest" cp $prefix/src/dcpomatic/fonts/LiberationSans-Italic.ttf "$dest" cp $prefix/src/dcpomatic/fonts/LiberationSans-Bold.ttf "$dest" diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index b7f87fe7a..4dff7b5bf 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -1489,6 +1489,116 @@ private: }; +class NonStandardPage : public Page +{ +public: + NonStandardPage(wxSize panel_size, int border) + : Page(panel_size, border) + {} + + wxString GetName() const override + { + return _("Non-standard"); + } + +#ifdef DCPOMATIC_OSX + wxBitmap GetLargeIcon() const override + { + return wxBitmap(icon_path("non_standard"), wxBITMAP_TYPE_PNG); + } +#endif + +private: + void setup() override + { + auto table = new wxFlexGridSizer(2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); + table->AddGrowableCol(1, 1); + _panel->GetSizer()->Add(table, 1, wxALL | wxEXPAND, _border); + + { + add_label_to_sizer(table, _panel, _("Maximum JPEG2000 bandwidth"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); + wxBoxSizer* s = new wxBoxSizer(wxHORIZONTAL); + _maximum_j2k_bandwidth = new wxSpinCtrl(_panel); + s->Add(_maximum_j2k_bandwidth, 1); + add_label_to_sizer(s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxALIGN_CENTRE_VERTICAL); + table->Add(s, 1); + } + + _allow_any_dcp_frame_rate = new CheckBox(_panel, _("Allow any DCP frame rate")); + table->Add(_allow_any_dcp_frame_rate, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); + table->AddSpacer(0); + + _allow_any_container = new CheckBox(_panel, _("Allow full-frame and non-standard container ratios")); + table->Add(_allow_any_container, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); + auto restart = new StaticText(_panel, _("(restart DCP-o-matic to see all ratios)")); + auto font = restart->GetFont(); + font.SetStyle(wxFONTSTYLE_ITALIC); + font.SetPointSize(font.GetPointSize() - 1); + restart->SetFont(font); + table->Add(restart, 1, wxALIGN_CENTRE_VERTICAL | wxBOTTOM, DCPOMATIC_CHECKBOX_BOTTOM_PAD); + restart->SetFont(font); + + _allow_96khz_audio = new CheckBox(_panel, _("Allow creation of DCPs with 96kHz audio")); + table->Add(_allow_96khz_audio, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); + table->AddSpacer (0); + + _use_all_audio_channels = new CheckBox(_panel, _("Allow mapping to all audio channels")); + table->Add(_use_all_audio_channels, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); + table->AddSpacer(0); + + _maximum_j2k_bandwidth->SetRange(1, 1000); + _maximum_j2k_bandwidth->Bind(wxEVT_SPINCTRL, boost::bind(&NonStandardPage::maximum_j2k_bandwidth_changed, this)); + _allow_any_dcp_frame_rate->bind(&NonStandardPage::allow_any_dcp_frame_rate_changed, this); + _allow_any_container->bind(&NonStandardPage::allow_any_container_changed, this); + _allow_96khz_audio->bind(&NonStandardPage::allow_96khz_audio_changed, this); + _use_all_audio_channels->bind(&NonStandardPage::use_all_channels_changed, this); + } + + void config_changed() override + { + auto config = Config::instance(); + + checked_set(_maximum_j2k_bandwidth, config->maximum_j2k_bandwidth() / 1000000); + checked_set(_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate()); + checked_set(_allow_any_container, config->allow_any_container()); + checked_set(_allow_96khz_audio, config->allow_96khz_audio()); + checked_set(_use_all_audio_channels, config->use_all_audio_channels()); + } + + void maximum_j2k_bandwidth_changed() + { + Config::instance()->set_maximum_j2k_bandwidth(_maximum_j2k_bandwidth->GetValue() * 1000000); + } + + void allow_any_dcp_frame_rate_changed() + { + Config::instance()->set_allow_any_dcp_frame_rate(_allow_any_dcp_frame_rate->GetValue()); + } + + void allow_any_container_changed() + { + Config::instance()->set_allow_any_container(_allow_any_container->GetValue()); + } + + void allow_96khz_audio_changed() + { + Config::instance()->set_allow_96hhz_audio(_allow_96khz_audio->GetValue()); + } + + void use_all_channels_changed() + { + Config::instance()->set_use_all_audio_channels(_use_all_audio_channels->GetValue()); + } + + wxSpinCtrl* _maximum_j2k_bandwidth = nullptr; + CheckBox* _allow_any_dcp_frame_rate = nullptr; + CheckBox* _allow_any_container = nullptr; + CheckBox* _allow_96khz_audio = nullptr; + CheckBox* _use_all_audio_channels = nullptr; +}; + + + /** @class AdvancedPage * @brief Advanced page of the preferences dialog. */ @@ -1529,15 +1639,6 @@ private: table->AddGrowableCol (1, 1); _panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border); - { - add_label_to_sizer (table, _panel, _("Maximum JPEG2000 bandwidth"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); - wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); - _maximum_j2k_bandwidth = new wxSpinCtrl (_panel); - s->Add (_maximum_j2k_bandwidth, 1); - add_label_to_sizer (s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxALIGN_CENTRE_VERTICAL); - table->Add (s, 1); - } - add_label_to_sizer (table, _panel, _("Video display mode"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); _video_display_mode = new wxChoice (_panel, wxID_ANY); table->Add (_video_display_mode); @@ -1549,24 +1650,6 @@ private: restart->SetFont (font); table->AddSpacer (0); - _allow_any_dcp_frame_rate = new CheckBox (_panel, _("Allow any DCP frame rate")); - table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); - table->AddSpacer (0); - - _allow_any_container = new CheckBox (_panel, _("Allow full-frame and non-standard container ratios")); - table->Add (_allow_any_container, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); - restart = new StaticText (_panel, _("(restart DCP-o-matic to see all ratios)")); - table->Add(restart, 1, wxALIGN_CENTRE_VERTICAL | wxBOTTOM, DCPOMATIC_CHECKBOX_BOTTOM_PAD); - restart->SetFont (font); - - _allow_96khz_audio = new CheckBox (_panel, _("Allow creation of DCPs with 96kHz audio")); - table->Add (_allow_96khz_audio, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); - table->AddSpacer (0); - - _use_all_audio_channels = new CheckBox(_panel, _("Allow mapping to all audio channels")); - table->Add(_use_all_audio_channels, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); - table->AddSpacer(0); - _show_experimental_audio_processors = new CheckBox (_panel, _("Show experimental audio processors")); table->Add (_show_experimental_audio_processors, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); table->AddSpacer (0); @@ -1660,17 +1743,11 @@ private: table->AddSpacer (0); #endif - _maximum_j2k_bandwidth->SetRange (1, 1000); - _maximum_j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind (&AdvancedPage::maximum_j2k_bandwidth_changed, this)); _video_display_mode->Append (_("Simple (safer)")); #if wxCHECK_VERSION(3, 1, 0) _video_display_mode->Append (_("OpenGL (faster)")); #endif _video_display_mode->Bind (wxEVT_CHOICE, boost::bind(&AdvancedPage::video_display_mode_changed, this)); - _allow_any_dcp_frame_rate->bind(&AdvancedPage::allow_any_dcp_frame_rate_changed, this); - _allow_any_container->bind(&AdvancedPage::allow_any_container_changed, this); - _allow_96khz_audio->bind(&AdvancedPage::allow_96khz_audio_changed, this); - _use_all_audio_channels->bind(&AdvancedPage::use_all_channels_changed, this); _show_experimental_audio_processors->bind(&AdvancedPage::show_experimental_audio_processors_changed, this); _only_servers_encode->bind(&AdvancedPage::only_servers_encode_changed, this); _frames_in_memory_multiplier->Bind (wxEVT_SPINCTRL, boost::bind(&AdvancedPage::frames_in_memory_multiplier_changed, this)); @@ -1695,7 +1772,6 @@ private: { auto config = Config::instance (); - checked_set (_maximum_j2k_bandwidth, config->maximum_j2k_bandwidth() / 1000000); switch (config->video_view_type()) { case Config::VIDEO_VIEW_SIMPLE: checked_set (_video_display_mode, 0); @@ -1704,10 +1780,6 @@ private: checked_set (_video_display_mode, 1); break; } - checked_set (_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate ()); - checked_set (_allow_any_container, config->allow_any_container ()); - checked_set (_allow_96khz_audio, config->allow_96khz_audio()); - checked_set (_use_all_audio_channels, config->use_all_audio_channels()); checked_set (_show_experimental_audio_processors, config->show_experimental_audio_processors ()); checked_set (_only_servers_encode, config->only_servers_encode ()); checked_set (_log_general, config->log_types() & LogEntry::TYPE_GENERAL); @@ -1726,11 +1798,6 @@ private: #endif } - void maximum_j2k_bandwidth_changed () - { - Config::instance()->set_maximum_j2k_bandwidth(_maximum_j2k_bandwidth->GetValue() * 1000000); - } - void video_display_mode_changed () { if (_video_display_mode->GetSelection() == 0) { @@ -1745,26 +1812,6 @@ private: Config::instance()->set_frames_in_memory_multiplier(_frames_in_memory_multiplier->GetValue()); } - void allow_any_dcp_frame_rate_changed () - { - Config::instance()->set_allow_any_dcp_frame_rate(_allow_any_dcp_frame_rate->GetValue()); - } - - void allow_any_container_changed () - { - Config::instance()->set_allow_any_container(_allow_any_container->GetValue()); - } - - void allow_96khz_audio_changed () - { - Config::instance()->set_allow_96hhz_audio(_allow_96khz_audio->GetValue()); - } - - void use_all_channels_changed () - { - Config::instance()->set_use_all_audio_channels(_use_all_audio_channels->GetValue()); - } - void show_experimental_audio_processors_changed () { Config::instance()->set_show_experimental_audio_processors(_show_experimental_audio_processors->GetValue()); @@ -1828,13 +1875,8 @@ private: } #endif - wxSpinCtrl* _maximum_j2k_bandwidth = nullptr; wxChoice* _video_display_mode = nullptr; wxSpinCtrl* _frames_in_memory_multiplier = nullptr; - CheckBox* _allow_any_dcp_frame_rate = nullptr; - CheckBox* _allow_any_container = nullptr; - CheckBox* _allow_96khz_audio = nullptr; - CheckBox* _use_all_audio_channels = nullptr; CheckBox* _show_experimental_audio_processors = nullptr; CheckBox* _only_servers_encode = nullptr; NameFormatEditor* _dcp_metadata_filename_format = nullptr; @@ -1883,6 +1925,7 @@ create_full_config_dialog () e->AddPage (new NotificationsPage (ps, border)); e->AddPage (new CoverSheetPage (ps, border)); e->AddPage (new IdentifiersPage (ps, border)); + e->AddPage (new NonStandardPage (ps, border)); e->AddPage (new AdvancedPage (ps, border)); return e; } -- 2.30.2