-
- AudioContentList c = _parent->selected_audio ();
- for (AudioContentList::const_iterator i = c.begin(); i != c.end(); ++i) {
- (*i)->set_audio_processor (p);
+
+ list<string> why_not;
+ bool const can_reference = dcp && dcp->can_reference_audio (why_not);
+ _reference->Enable (can_reference);
+
+ wxString s;
+ if (!can_reference) {
+ s = _("Cannot reference this DCP. ");
+ BOOST_FOREACH (string i, why_not) {
+ s += std_to_wx(i) + wxT(" ");
+ }
+ }
+ _reference->SetToolTip (s);
+
+ if (_reference->GetValue ()) {
+ _gain->wrapped()->Enable (false);
+ _gain_calculate_button->Enable (false);
+ _peak->Enable (false);
+ _delay->wrapped()->Enable (false);
+ _mapping->Enable (false);
+ _description->Enable (false);
+ } else {
+ _gain->wrapped()->Enable (true);
+ _gain_calculate_button->Enable (sel.size() == 1);
+ _peak->Enable (true);
+ _delay->wrapped()->Enable (true);
+ _mapping->Enable (sel.size() == 1);
+ _description->Enable (true);