X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fcontent_panel.cc;h=b752a0e5fe3d41d5dfde90a4b275f3385e3a9e07;hb=4ddf91dda7d84f169e4b905fd41cf747f4a0102c;hp=13ae2d88ae6d9abd8e3bd5d0d00c9dff608daab0;hpb=fc56dc97103d00437843a31e1ef0c4915900ad1a;p=dcpomatic.git diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 13ae2d88a..b752a0e5f 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -38,6 +38,7 @@ using std::list; using std::string; +using std::cout; using boost::shared_ptr; using boost::weak_ptr; using boost::dynamic_pointer_cast; @@ -399,7 +400,7 @@ ContentPanel::set_selection (weak_ptr wc) void ContentPanel::film_content_changed (int property) { - if (property == ContentProperty::PATH || property == ContentProperty::POSITION) { + if (property == ContentProperty::PATH || property == ContentProperty::POSITION || property == DCPContentProperty::CAN_BE_PLAYED) { setup (); } @@ -425,19 +426,26 @@ ContentPanel::setup () for (ContentList::iterator i = content.begin(); i != content.end(); ++i) { int const t = _content->GetItemCount (); bool const valid = (*i)->paths_valid (); + shared_ptr dcp = dynamic_pointer_cast (*i); + bool const needs_kdm = dcp && !dcp->can_be_played (); string s = (*i)->summary (); + if (!valid) { s = _("MISSING: ") + s; } + if (needs_kdm) { + s = _("NEEDS KDM: ") + s; + } + _content->InsertItem (t, std_to_wx (s)); if ((*i)->summary() == selected_summary) { _content->SetItemState (t, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); } - if (!valid) { + if (!valid || needs_kdm) { _content->SetItemTextColour (t, *wxRED); } }