Remove now-unused default-scale-to config option.
authorCarl Hetherington <cth@carlh.net>
Sun, 10 May 2020 23:50:01 +0000 (01:50 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 11 May 2020 20:02:49 +0000 (22:02 +0200)
src/lib/config.cc
src/lib/config.h
src/wx/full_config_dialog.cc

index ebb6ece931f0bed3899e734f17c0baefdb2f4dad..18955a8969283f618eaebd05ed8aaddd15f01435 100644 (file)
@@ -99,7 +99,6 @@ Config::set_defaults ()
        _language = optional<string> ();
        _default_still_length = 10;
        _default_container = Ratio::from_id ("185");
-       _default_scale_to = 0;
        _default_dcp_content_type = DCPContentType::from_isdcf_name ("FTR");
        _default_dcp_audio_channels = 6;
        _default_j2k_bandwidth = 150000000;
@@ -309,11 +308,6 @@ try
                _default_container = Ratio::from_id ("185");
        }
 
-       c = f.optional_string_child ("DefaultScaleTo");
-       if (c) {
-               _default_scale_to = Ratio::from_id (c.get ());
-       }
-
        _default_dcp_content_type = DCPContentType::from_isdcf_name(f.optional_string_child("DefaultDCPContentType").get_value_or("FTR"));
        _default_dcp_audio_channels = f.optional_number_child<int>("DefaultDCPAudioChannels").get_value_or (6);
 
@@ -719,12 +713,6 @@ Config::write_config () const
                */
                root->add_child("DefaultContainer")->add_child_text (_default_container->id ());
        }
-       if (_default_scale_to) {
-               /* [XML:opt] DefaultScaleTo ID of default ratio to scale content to when creating new films
-                  (see <code>DefaultContainer</code> for IDs).
-               */
-               root->add_child("DefaultScaleTo")->add_child_text (_default_scale_to->id ());
-       }
        if (_default_dcp_content_type) {
                /* [XML:opt] DefaultDCPContentType Default content type ot use when creating new films (<code>FTR</code>, <code>SHR</code>,
                   <code>TLR</code>, <code>TST</code>, <code>XSN</code>, <code>RTG</code>, <code>TSR</code>, <code>POL</code>,
index f54ca3814043abf5c8fa51c619c975cf87591113..23f7ce0b3c885f1ac3e83cd9aea4227f4f1d8b49 100644 (file)
@@ -186,10 +186,6 @@ public:
                return _default_container;
        }
 
-       Ratio const * default_scale_to () const {
-               return _default_scale_to;
-       }
-
        DCPContentType const * default_dcp_content_type () const {
                return _default_dcp_content_type;
        }
@@ -686,10 +682,6 @@ public:
                maybe_set (_default_container, c);
        }
 
-       void set_default_scale_to (Ratio const * c) {
-               maybe_set (_default_scale_to, c);
-       }
-
        void set_default_dcp_content_type (DCPContentType const * t) {
                maybe_set (_default_dcp_content_type, t);
        }
@@ -1233,7 +1225,6 @@ private:
        /** Default length of still image content (seconds) */
        int _default_still_length;
        Ratio const * _default_container;
-       Ratio const * _default_scale_to;
        DCPContentType const * _default_dcp_content_type;
        int _default_dcp_audio_channels;
        std::string _dcp_issuer;
index 370ec35a1a90ea0b13cfd5ceb1780595658fe814..fff0d2035289f91e774e0d2d10e36311027d13ce 100644 (file)
@@ -340,10 +340,6 @@ private:
                _container = new wxChoice (_panel, wxID_ANY);
                table->Add (_container);
 
-               add_label_to_sizer (table, _panel, _("Default scale-to"), true);
-               _scale_to = new wxChoice (_panel, wxID_ANY);
-               table->Add (_scale_to);
-
                add_label_to_sizer (table, _panel, _("Default content type"), true);
                _dcp_content_type = new wxChoice (_panel, wxID_ANY);
                table->Add (_dcp_content_type);
@@ -400,14 +396,6 @@ private:
 
                _container->Bind (wxEVT_CHOICE, boost::bind (&DefaultsPage::container_changed, this));
 
-               _scale_to->Append (_("Guess from content"));
-
-               BOOST_FOREACH (Ratio const * i, Ratio::all()) {
-                       _scale_to->Append (std_to_wx(i->image_nickname()));
-               }
-
-               _scale_to->Bind (wxEVT_CHOICE, boost::bind (&DefaultsPage::scale_to_changed, this));
-
                BOOST_FOREACH (DCPContentType const * i, DCPContentType::all()) {
                        _dcp_content_type->Append (std_to_wx (i->pretty_name ()));
                }
@@ -441,17 +429,6 @@ private:
                        }
                }
 
-               vector<Ratio const *> ratios = Ratio::all ();
-               for (size_t i = 0; i < ratios.size(); ++i) {
-                       if (ratios[i] == config->default_scale_to ()) {
-                               _scale_to->SetSelection (i + 1);
-                       }
-               }
-
-               if (!config->default_scale_to()) {
-                       _scale_to->SetSelection (0);
-               }
-
                vector<DCPContentType const *> const ct = DCPContentType::all ();
                for (size_t i = 0; i < ct.size(); ++i) {
                        if (ct[i] == config->default_dcp_content_type ()) {
@@ -519,17 +496,6 @@ private:
                Config::instance()->set_default_container (ratio[_container->GetSelection()]);
        }
 
-       void scale_to_changed ()
-       {
-               int const s = _scale_to->GetSelection ();
-               if (s == 0) {
-                       Config::instance()->set_default_scale_to (0);
-               } else {
-                       vector<Ratio const *> ratio = Ratio::all ();
-                       Config::instance()->set_default_scale_to (ratio[s - 1]);
-               }
-       }
-
        void dcp_content_type_changed ()
        {
                vector<DCPContentType const *> ct = DCPContentType::all ();
@@ -558,7 +524,6 @@ private:
        wxDirPickerCtrl* _kdm_directory;
 #endif
        wxChoice* _container;
-       wxChoice* _scale_to;
        wxChoice* _dcp_content_type;
        wxChoice* _dcp_audio_channels;
        wxChoice* _standard;