diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-05-15 00:03:44 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-28 02:01:58 +0100 |
| commit | 0e60f0e982a22f1642342b8d046a95c8813045a0 (patch) | |
| tree | d568230e4c63740668cdfe5a277ad68ecefd6a35 /src/wx/text_panel.cc | |
| parent | 3d002a06ec31ab74cd260238b9f10f4de635aa7e (diff) | |
Remove reference checkboxes from video/audio/text tabs.
Diffstat (limited to 'src/wx/text_panel.cc')
| -rw-r--r-- | src/wx/text_panel.cc | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index 78c024565..c3a5706b0 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -84,14 +84,6 @@ TextPanel::create () refer = _("Use this DCP's closed caption as OV and make VF"); } - _reference = new CheckBox (this, refer); - _reference_note = new StaticText (this, wxT("")); - _reference_note->Wrap (200); - auto font = _reference_note->GetFont(); - font.SetStyle(wxFONTSTYLE_ITALIC); - font.SetPointSize(font.GetPointSize() - 1); - _reference_note->SetFont(font); - _use = new CheckBox (this, _("Use as")); _type = new wxChoice (this, wxID_ANY); _type->Append (_("open subtitles")); @@ -132,7 +124,6 @@ TextPanel::create () _y_scale->SetRange (0, 1000); _line_spacing->SetRange (0, 1000); - _reference->bind(&TextPanel::reference_clicked, this); _use->bind(&TextPanel::use_toggled, this); _type->Bind (wxEVT_CHOICE, boost::bind (&TextPanel::type_changed, this)); _burn->bind(&TextPanel::burn_toggled, this); @@ -232,12 +223,6 @@ TextPanel::add_to_grid () { int r = 0; - auto reference_sizer = new wxBoxSizer (wxVERTICAL); - reference_sizer->Add (_reference, 0); - reference_sizer->Add (_reference_note, 0); - _grid->Add (reference_sizer, wxGBPosition(r, 0), wxGBSpan(1, 4)); - ++r; - auto use = new wxBoxSizer (wxHORIZONTAL); use->Add (_use, 0, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_GAP); use->Add (_type, 1, wxEXPAND, 0); @@ -496,15 +481,6 @@ TextPanel::film_content_changed (int property) if (_language_type) { _language_type->SetSelection (text ? (text->language_is_additional() ? 1 : 0) : 0); } - } else if (property == DCPContentProperty::REFERENCE_TEXT) { - if (scs) { - auto dcp = dynamic_pointer_cast<DCPContent> (scs); - checked_set (_reference, dcp ? dcp->reference_text(_original_type) : false); - } else { - checked_set (_reference, false); - } - - setup_sensitivity (); } else if (property == DCPContentProperty::TEXTS) { setup_sensitivity (); } else if (property == ContentProperty::TRIM_START) { @@ -593,17 +569,7 @@ TextPanel::setup_sensitivity () dcp = dynamic_pointer_cast<DCPContent>(sel.front()); } - string why_not; - bool const can_reference = dcp && dcp->can_reference_text (_parent->film(), _original_type, why_not); - wxString cannot; - if (why_not.empty()) { - cannot = _("Cannot reference this DCP's subtitles or captions."); - } else { - cannot = _("Cannot reference this DCP's subtitles or captions: ") + std_to_wx(why_not); - } - setup_refer_button (_reference, _reference_note, dcp, can_reference, cannot); - - bool const reference = _reference->GetValue (); + auto const reference = dcp && dcp->reference_text(_original_type); auto const type = current_type (); @@ -763,23 +729,6 @@ TextPanel::fonts_dialog_clicked () void -TextPanel::reference_clicked () -{ - auto c = _parent->selected (); - if (c.size() != 1) { - return; - } - - auto d = dynamic_pointer_cast<DCPContent> (c.front ()); - if (!d) { - return; - } - - d->set_reference_text (_original_type, _reference->GetValue ()); -} - - -void TextPanel::appearance_dialog_clicked () { auto c = _parent->selected_text (); |
