using std::list;
using std::string;
+using std::cout;
using boost::shared_ptr;
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
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 ();
}
for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
int const t = _content->GetItemCount ();
bool const valid = (*i)->paths_valid ();
+ shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent> (*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);
}
}