-void
-Controls::add_clicked ()
-{
- shared_ptr<Content> sel = _content_view->selected()->clone();
- DCPOMATIC_ASSERT (sel);
- _film->examine_and_add_content (sel);
- bool const ok = display_progress (_("DCP-o-matic"), _("Loading DCP"));
- if (!ok || !report_errors_from_last_job(this)) {
- return;
- }
- add_content_to_list (sel, _current_spl_view);
- setup_sensitivity ();
-}
-
-void
-Controls::save_clicked ()
-{
- wxFileDialog* d = new wxFileDialog (
- this, _("Select playlist file"), wxEmptyString, wxEmptyString, wxT ("XML files (*.xml)|*.xml"),
- wxFD_SAVE | wxFD_OVERWRITE_PROMPT
- );
-
- if (d->ShowModal() == wxID_OK) {
- boost::filesystem::path p(wx_to_std(d->GetPath()));
- _film->set_name(p.stem().string());
- _film->write_metadata(p);
- }
-
- d->Destroy ();
-}
-
-void
-Controls::load_clicked ()
-{
- wxFileDialog* d = new wxFileDialog (
- this, _("Select playlist file"), wxEmptyString, wxEmptyString, wxT ("XML files (*.xml)|*.xml")
- );
-
- if (d->ShowModal() == wxID_OK) {
- _film->read_metadata (boost::filesystem::path(wx_to_std(d->GetPath())));
- _current_spl_view->DeleteAllItems ();
- BOOST_FOREACH (shared_ptr<Content> i, _film->content()) {
- shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent>(i);
- add_content_to_list (dcp, _current_spl_view);
- }
- }
-
- d->Destroy ();
-}
-