+ _views.clear ();
+}
+
+void
+ContentMenu::find_missing ()
+{
+ if (_content.size() != 1) {
+ return;
+ }
+
+ shared_ptr<const Film> film = _film.lock ();
+ if (!film) {
+ return;
+ }
+
+ shared_ptr<Content> content;
+
+ /* XXX: a bit nasty */
+ shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (_content.front ());
+ shared_ptr<DCPContent> dc = dynamic_pointer_cast<DCPContent> (_content.front ());
+
+ int r = wxID_CANCEL;
+ boost::filesystem::path path;
+
+ if ((ic && !ic->still ()) || dc) {
+ wxDirDialog* d = new wxDirDialog (0, _("Choose a folder"), wxT (""), wxDD_DIR_MUST_EXIST);
+ r = d->ShowModal ();
+ path = wx_to_std (d->GetPath ());
+ d->Destroy ();
+ } else {
+ wxFileDialog* d = new wxFileDialog (0, _("Choose a file"), wxT (""), wxT (""), wxT ("*.*"), wxFD_MULTIPLE);
+ r = d->ShowModal ();
+ path = wx_to_std (d->GetPath ());
+ d->Destroy ();
+ }
+
+ if (r == wxID_OK) {
+ content = content_factory (film, path);
+ }
+
+ if (!content) {
+ return;
+ }
+
+ shared_ptr<Job> j (new ExamineContentJob (film, content));
+
+ _job_connection = j->Finished.connect (
+ bind (
+ &ContentMenu::maybe_found_missing,
+ this,
+ boost::weak_ptr<Job> (j),
+ boost::weak_ptr<Content> (_content.front ()),
+ boost::weak_ptr<Content> (content)
+ )
+ );
+
+ JobManager::instance()->add (j);
+}
+
+void
+ContentMenu::re_examine ()
+{
+ shared_ptr<Film> film = _film.lock ();
+ if (!film) {
+ return;
+ }
+
+ BOOST_FOREACH (shared_ptr<Content> i, _content) {
+ film->examine_content (i);
+ }