X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwx%2Fcontent_menu.cc;h=0adbc775a9134810e9db50ec4b1b4cb9f08a96f7;hb=e60bb3e51bd1508b149e6b8f6608f09b5196ae26;hp=3cf9f23dcf636f2544fe7edf1668bb2fcee524b4;hpb=f07d5125a7b609320682689abe40781f096ca25e;p=dcpomatic.git diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index 3cf9f23dc..0adbc775a 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -91,9 +91,9 @@ ContentMenu::popup (weak_ptr film, ContentList c, TimelineContentViewList ++n; } } - + _join->Enable (n > 1); - + _find_missing->Enable (_content.size() == 1 && !_content.front()->paths_valid ()); _properties->Enable (_content.size() == 1); _re_examine->Enable (!_content.empty ()); @@ -104,7 +104,7 @@ ContentMenu::popup (weak_ptr film, ContentList c, TimelineContentViewList } else { _kdm->Enable (false); } - + _remove->Enable (!_content.empty ()); _parent->PopupMenu (_menu, p); } @@ -115,7 +115,7 @@ ContentMenu::repeat () if (_content.empty ()) { return; } - + RepeatDialog* d = new RepeatDialog (_parent); if (d->ShowModal() != wxID_OK) { d->Destroy (); @@ -186,7 +186,7 @@ ContentMenu::remove () if (!fc) { continue; } - + shared_ptr video; shared_ptr audio; @@ -228,7 +228,7 @@ ContentMenu::find_missing () if (!film) { return; } - + shared_ptr content; /* XXX: a bit nasty */ @@ -254,7 +254,7 @@ ContentMenu::find_missing () } shared_ptr j (new ExamineContentJob (film, content)); - + _job_connection = j->Finished.connect ( bind ( &ContentMenu::maybe_found_missing, @@ -264,7 +264,7 @@ ContentMenu::find_missing () boost::weak_ptr (content) ) ); - + JobManager::instance()->add (j); } @@ -308,16 +308,16 @@ ContentMenu::kdm () DCPOMATIC_ASSERT (!_content.empty ()); shared_ptr dcp = dynamic_pointer_cast (_content.front ()); DCPOMATIC_ASSERT (dcp); - + wxFileDialog* d = new wxFileDialog (_parent, _("Select KDM")); - + if (d->ShowModal() == wxID_OK) { dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ())))); shared_ptr film = _film.lock (); DCPOMATIC_ASSERT (film); film->examine_content (dcp); } - + d->Destroy (); }