Rename Choice::add to Choice::add_entry.
authorCarl Hetherington <cth@carlh.net>
Wed, 3 Apr 2024 21:02:41 +0000 (23:02 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 22 Apr 2024 11:03:04 +0000 (13:03 +0200)
src/wx/dcp_panel.cc
src/wx/dcp_timeline.cc
src/wx/dcpomatic_choice.cc
src/wx/dcpomatic_choice.h
src/wx/full_config_dialog.cc
src/wx/kdm_timing_panel.cc
src/wx/metadata_dialog.cc

index 4ae89d443d499701ab38251cc0f90323d70646ea..5ad719abceacc1957d2e0bfd9ffeff7ea90b2614 100644 (file)
@@ -131,7 +131,7 @@ DCPPanel::DCPPanel(wxNotebook* n, shared_ptr<Film> film, FilmViewer& viewer)
        _reels->Bind(wxEVT_BUTTON, boost::bind(&DCPPanel::reels_clicked, this));
 
        for (auto i: DCPContentType::all()) {
-               _dcp_content_type->add(i->pretty_name());
+               _dcp_content_type->add_entry(i->pretty_name());
        }
 
        add_standards();
@@ -146,12 +146,12 @@ DCPPanel::DCPPanel(wxNotebook* n, shared_ptr<Film> film, FilmViewer& viewer)
 void
 DCPPanel::add_standards()
 {
-       _standard->add(_("SMPTE"), N_("smpte"));
+       _standard->add_entry(_("SMPTE"), N_("smpte"));
        if (Config::instance()->allow_smpte_bv20() || (_film && _film->limit_to_smpte_bv20())) {
-               _standard->add(_("SMPTE (Bv2.0 only)"), N_("smpte-bv20"));
+               _standard->add_entry(_("SMPTE (Bv2.0 only)"), N_("smpte-bv20"));
        }
-       _standard->add(_("Interop"), N_("interop"));
-       _standard->add(_("MPEG2 Interop"), N_("mpeg2-interop"));
+       _standard->add_entry(_("Interop"), N_("interop"));
+       _standard->add_entry(_("MPEG2 Interop"), N_("mpeg2-interop"));
        _sizer->Layout();
 }
 
@@ -827,14 +827,14 @@ DCPPanel::make_video_panel ()
        }
 
        for (auto i: Config::instance()->allowed_dcp_frame_rates()) {
-               _frame_rate_choice->add(boost::lexical_cast<string>(i));
+               _frame_rate_choice->add_entry(boost::lexical_cast<string>(i));
        }
 
        _video_bit_rate->SetRange(1, Config::instance()->maximum_video_bit_rate() / 1000000);
        _frame_rate_spin->SetRange (1, 480);
 
-       _resolution->add(_("2K"));
-       _resolution->add(_("4K"));
+       _resolution->add_entry(_("2K"));
+       _resolution->add_entry(_("4K"));
 
        add_video_panel_to_grid ();
        setup_frame_rate_widget();
@@ -1024,9 +1024,9 @@ DCPPanel::show_audio_clicked ()
 void
 DCPPanel::add_audio_processors ()
 {
-       _audio_processor->add(_("None"), new wxStringClientData(N_("none")));
+       _audio_processor->add_entry(_("None"), new wxStringClientData(N_("none")));
        for (auto ap: AudioProcessor::visible()) {
-               _audio_processor->add(std_to_wx(ap->name()), new wxStringClientData(std_to_wx(ap->id())));
+               _audio_processor->add_entry(std_to_wx(ap->name()), new wxStringClientData(std_to_wx(ap->id())));
        }
        _audio_panel_sizer->Layout();
 }
index 6474a8428af09396fa0fd289857ce01aab1afb87..7b8e933258b06e1c712fdb0bd4352fde9d4a60a6 100644 (file)
@@ -230,10 +230,10 @@ DCPTimeline::setup_reel_settings()
        int r = 0;
        add_label_to_sizer(sizer, _reel_settings, _("Reel mode"), true, wxGBPosition(r, 0));
        _reel_type = new Choice(_reel_settings);
-       _reel_type->add(_("Single reel"));
-       _reel_type->add(_("Split by video content"));
-       _reel_type->add(_("Split by maximum reel size"));
-       _reel_type->add(_("Custom"));
+       _reel_type->add_entry(_("Single reel"));
+       _reel_type->add_entry(_("Split by video content"));
+       _reel_type->add_entry(_("Split by maximum reel size"));
+       _reel_type->add_entry(_("Custom"));
        sizer->Add(_reel_type, wxGBPosition(r, 1));
        ++r;
 
index 2f1a6f0e9b782b34d006912afd71b9cc5350fc13..5e5a1e2575444dfa4dc0361b9ef3d6c2ce8c10b4 100644 (file)
@@ -40,14 +40,14 @@ Choice::Choice(wxWindow* parent)
 
 
 void
-Choice::add(string const& entry)
+Choice::add_entry(string const& entry)
 {
-       add(std_to_wx(entry));
+       add_entry(std_to_wx(entry));
 }
 
 
 void
-Choice::add(wxString const& entry)
+Choice::add_entry(wxString const& entry)
 {
        if (_needs_clearing) {
                Clear();
@@ -59,7 +59,7 @@ Choice::add(wxString const& entry)
 
 
 void
-Choice::add(wxString const& entry, wxClientData* data)
+Choice::add_entry(wxString const& entry, wxClientData* data)
 {
        if (_needs_clearing) {
                Clear();
@@ -71,7 +71,7 @@ Choice::add(wxString const& entry, wxClientData* data)
 
 
 void
-Choice::add(wxString const& entry, wxString const& data)
+Choice::add_entry(wxString const& entry, wxString const& data)
 {
        if (_needs_clearing) {
                Clear();
index dec0a3701684bbdff6d4bb1114929bc5fc980b1e..ed59f6a176a08a2da9415d71ab126ddd8e047a36 100644 (file)
@@ -32,10 +32,10 @@ class Choice : public wxChoice
 public:
        Choice(wxWindow* parent);
 
-       void add(wxString const& entry);
-       void add(wxString const& entry, wxClientData* data);
-       void add(wxString const& entry, wxString const& data);
-       void add(std::string const& entry);
+       void add_entry(wxString const& entry);
+       void add_entry(wxString const& entry, wxClientData* data);
+       void add_entry(wxString const& entry, wxString const& data);
+       void add_entry(std::string const& entry);
        void set(int index);
        void set_by_data(wxString const& data);
        boost::optional<int> get() const;
index c3c194fbccd9246d161f52b0f33c9e2717a82f35..2947d98ebea12effcd13eff83a1a482245f9bdec 100644 (file)
@@ -147,8 +147,8 @@ private:
 
                add_update_controls (table, r);
 
-               _default_add_file_location->add(_("Same place as last time"));
-               _default_add_file_location->add(_("Same place as project"));
+               _default_add_file_location->add_entry(_("Same place as last time"));
+               _default_add_file_location->add_entry(_("Same place as project"));
                _default_add_file_location->bind(&FullGeneralPage::default_add_file_location_changed, this);
 
                _config_file->Bind  (wxEVT_FILEPICKER_CHANGED, boost::bind(&FullGeneralPage::config_file_changed,  this));
index f4112cb087da5e0552d2bcfc1e9c0d1352838e28..6e362a3b2c5d19ac6e49314601925bb4703faa4b 100644 (file)
@@ -124,7 +124,7 @@ KDMTimingPanel::KDMTimingPanel (wxWindow* parent)
        /* Default to UTC */
        size_t sel = get_offsets(_offsets);
        for (size_t i = 0; i < _offsets.size(); ++i) {
-               _utc_offset->add(_offsets[i].name);
+               _utc_offset->add_entry(_offsets[i].name);
                if (_offsets[i].hour == 0 && _offsets[i].minute == 0) {
                        sel = i;
                }
index 347f2fffd2beebf342e633f5e31f6860a294d9a3..1d075817519861ddd3e9c58eca249d656a641a59 100644 (file)
@@ -204,9 +204,9 @@ MetadataDialog::setup_standard (wxPanel* panel, wxSizer* sizer)
 {
        add_label_to_sizer(sizer, panel, _("Territory type"), true, 0, wxALIGN_CENTER_VERTICAL);
        _territory_type = new Choice(panel);
-       _territory_type->add(_("Specific"), wx_to_std(territory_type_to_string(TerritoryType::SPECIFIC)));
-       _territory_type->add(_("International texted"), wx_to_std(territory_type_to_string(TerritoryType::INTERNATIONAL_TEXTED)));
-       _territory_type->add(_("International textless"), wx_to_std(territory_type_to_string(TerritoryType::INTERNATIONAL_TEXTLESS)));
+       _territory_type->add_entry(_("Specific"), wx_to_std(territory_type_to_string(TerritoryType::SPECIFIC)));
+       _territory_type->add_entry(_("International texted"), wx_to_std(territory_type_to_string(TerritoryType::INTERNATIONAL_TEXTED)));
+       _territory_type->add_entry(_("International textless"), wx_to_std(territory_type_to_string(TerritoryType::INTERNATIONAL_TEXTLESS)));
        sizer->Add(_territory_type);
 
        _enable_release_territory = new CheckBox(panel, _("Release territory"));
@@ -330,8 +330,8 @@ MetadataDialog::setup_advanced (wxPanel* panel, wxSizer* sizer)
                sizer->Add (s, 1, wxEXPAND);
        }
 
-       _luminance_unit->add(_("candela per m²"));
-       _luminance_unit->add(_("foot lambert"));
+       _luminance_unit->add_entry(_("candela per m²"));
+       _luminance_unit->add_entry(_("foot lambert"));
 }