summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-24 11:38:53 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-24 11:38:53 +0100
commitb8ab7864ea798d633c4dbfa6be69c58a227d9ca2 (patch)
tree6891668d2b7022c19045a746817c28e985e77a14 /src
parent3412af70b950dcdc604413ef05c26becda6da789 (diff)
Revert "Bump libdcp for new method."
This reverts commit 3412af70b950dcdc604413ef05c26becda6da789.
Diffstat (limited to 'src')
-rw-r--r--src/lib/atmos_mxf_content.cc4
-rw-r--r--src/lib/atmos_mxf_content.h2
-rw-r--r--src/lib/config.cc8
-rw-r--r--src/lib/config.h2
-rw-r--r--src/lib/content.cc8
-rw-r--r--src/lib/content.h2
-rw-r--r--src/lib/dcp_content.cc2
-rw-r--r--src/lib/dcp_content.h2
-rw-r--r--src/lib/ffmpeg_content.cc4
-rw-r--r--src/lib/ffmpeg_content.h2
-rw-r--r--src/lib/film.cc4
-rw-r--r--src/lib/film.h2
-rw-r--r--src/lib/image_content.cc4
-rw-r--r--src/lib/image_content.h2
-rw-r--r--src/lib/playlist.cc4
-rw-r--r--src/lib/playlist.h2
-rw-r--r--src/lib/text_subtitle_content.cc4
-rw-r--r--src/lib/text_subtitle_content.h2
-rw-r--r--src/tools/dcpomatic.cc24
-rw-r--r--src/wx/new_film_dialog.cc27
-rw-r--r--src/wx/new_film_dialog.h5
-rw-r--r--src/wx/wscript1
22 files changed, 27 insertions, 90 deletions
diff --git a/src/lib/atmos_mxf_content.cc b/src/lib/atmos_mxf_content.cc
index 2fd9ead06..f8cc05178 100644
--- a/src/lib/atmos_mxf_content.cc
+++ b/src/lib/atmos_mxf_content.cc
@@ -79,10 +79,10 @@ AtmosMXFContent::summary () const
}
void
-AtmosMXFContent::as_xml (xmlpp::Node* node, bool with_paths) const
+AtmosMXFContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("AtmosMXF");
- Content::as_xml (node, with_paths);
+ Content::as_xml (node);
}
DCPTime
diff --git a/src/lib/atmos_mxf_content.h b/src/lib/atmos_mxf_content.h
index 0f5225c2e..10c969a7d 100644
--- a/src/lib/atmos_mxf_content.h
+++ b/src/lib/atmos_mxf_content.h
@@ -32,7 +32,7 @@ public:
void examine (boost::shared_ptr<Job> job);
std::string summary () const;
- void as_xml (xmlpp::Node* node, bool with_path) const;
+ void as_xml (xmlpp::Node* node) const;
DCPTime full_length () const;
static bool valid_mxf (boost::filesystem::path path);
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 383ffdbd6..4184a7d1d 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -588,11 +588,3 @@ Config::set_cinemas_file (boost::filesystem::path file)
changed (OTHER);
}
-
-void
-Config::save_template (shared_ptr<const Film> film, string name) const
-{
- boost::filesystem::create_directories (path ("templates"));
- shared_ptr<xmlpp::Document> doc = film->metadata (false);
- doc->write_to_file_formatted (path("templates") / tidy_for_filename (name));
-}
diff --git a/src/lib/config.h b/src/lib/config.h
index 3df5c3795..a988cda6b 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -514,8 +514,6 @@ public:
void write () const;
- void save_template (boost::shared_ptr<const Film> film, std::string name) const;
-
static Config* instance ();
static void drop ();
static void restore_defaults ();
diff --git a/src/lib/content.cc b/src/lib/content.cc
index a27032e9c..9083635f2 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -135,14 +135,12 @@ Content::Content (shared_ptr<const Film> film, vector<shared_ptr<Content> > c)
}
void
-Content::as_xml (xmlpp::Node* node, bool with_paths) const
+Content::as_xml (xmlpp::Node* node) const
{
boost::mutex::scoped_lock lm (_mutex);
- if (with_paths) {
- for (vector<boost::filesystem::path>::const_iterator i = _paths.begin(); i != _paths.end(); ++i) {
- node->add_child("Path")->add_child_text (i->string ());
- }
+ for (vector<boost::filesystem::path>::const_iterator i = _paths.begin(); i != _paths.end(); ++i) {
+ node->add_child("Path")->add_child_text (i->string ());
}
node->add_child("Digest")->add_child_text (_digest);
node->add_child("Position")->add_child_text (raw_convert<string> (_position.get ()));
diff --git a/src/lib/content.h b/src/lib/content.h
index e126c994b..f8b5493c0 100644
--- a/src/lib/content.h
+++ b/src/lib/content.h
@@ -86,7 +86,7 @@ public:
*/
virtual std::string technical_summary () const;
- virtual void as_xml (xmlpp::Node *, bool with_paths) const;
+ virtual void as_xml (xmlpp::Node *) const;
virtual DCPTime full_length () const = 0;
virtual std::string identifier () const;
/** @return points at which to split this content when
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index 5cacc824a..03e6f1aaa 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -192,7 +192,7 @@ DCPContent::technical_summary () const
}
void
-DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const
+DCPContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("DCP");
diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h
index 79c35d0e8..f3a8236a2 100644
--- a/src/lib/dcp_content.h
+++ b/src/lib/dcp_content.h
@@ -62,7 +62,7 @@ public:
void examine (boost::shared_ptr<Job>);
std::string summary () const;
std::string technical_summary () const;
- void as_xml (xmlpp::Node *, bool with_paths) const;
+ void as_xml (xmlpp::Node *) const;
std::string identifier () const;
void set_default_colour_conversion ();
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index bc913a9ae..b5c5ce0a8 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -181,10 +181,10 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<shared_ptr<Con
}
void
-FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const
+FFmpegContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("FFmpeg");
- Content::as_xml (node, with_paths);
+ Content::as_xml (node);
if (video) {
video->as_xml (node);
diff --git a/src/lib/ffmpeg_content.h b/src/lib/ffmpeg_content.h
index b341aa012..666322669 100644
--- a/src/lib/ffmpeg_content.h
+++ b/src/lib/ffmpeg_content.h
@@ -57,7 +57,7 @@ public:
void examine (boost::shared_ptr<Job>);
std::string summary () const;
std::string technical_summary () const;
- void as_xml (xmlpp::Node *, bool with_paths) const;
+ void as_xml (xmlpp::Node *) const;
DCPTime full_length () const;
std::string identifier () const;
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 31c47540f..edb911217 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -329,7 +329,7 @@ Film::send_dcp_to_tms ()
}
shared_ptr<xmlpp::Document>
-Film::metadata (bool with_content_paths) const
+Film::metadata () const
{
shared_ptr<xmlpp::Document> doc (new xmlpp::Document);
xmlpp::Element* root = doc->create_root_node ("Metadata");
@@ -364,7 +364,7 @@ Film::metadata (bool with_content_paths) const
root->add_child("ReelType")->add_child_text (raw_convert<string> (static_cast<int> (_reel_type)));
root->add_child("ReelLength")->add_child_text (raw_convert<string> (_reel_length));
root->add_child("UploadAfterMakeDCP")->add_child_text (_upload_after_make_dcp ? "1" : "0");
- _playlist->as_xml (root->add_child ("Playlist"), with_content_paths);
+ _playlist->as_xml (root->add_child ("Playlist"));
return doc;
}
diff --git a/src/lib/film.h b/src/lib/film.h
index abe5c214f..82d1f78c0 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -93,7 +93,7 @@ public:
std::list<std::string> read_metadata ();
void write_metadata () const;
- boost::shared_ptr<xmlpp::Document> metadata (bool with_content_paths = true) const;
+ boost::shared_ptr<xmlpp::Document> metadata () const;
std::string isdcf_name (bool if_created_now) const;
std::string dcp_name (bool if_created_now = false) const;
diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc
index b27483978..825f6da25 100644
--- a/src/lib/image_content.cc
+++ b/src/lib/image_content.cc
@@ -100,10 +100,10 @@ ImageContent::technical_summary () const
}
void
-ImageContent::as_xml (xmlpp::Node* node, bool with_paths) const
+ImageContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("Image");
- Content::as_xml (node, with_paths);
+ Content::as_xml (node);
if (video) {
video->as_xml (node);
diff --git a/src/lib/image_content.h b/src/lib/image_content.h
index 660d2ef9f..edcbec6dd 100644
--- a/src/lib/image_content.h
+++ b/src/lib/image_content.h
@@ -36,7 +36,7 @@ public:
void examine (boost::shared_ptr<Job>);
std::string summary () const;
std::string technical_summary () const;
- void as_xml (xmlpp::Node *, bool with_paths) const;
+ void as_xml (xmlpp::Node *) const;
DCPTime full_length () const;
std::string identifier () const;
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc
index a30dde633..a8b5a26eb 100644
--- a/src/lib/playlist.cc
+++ b/src/lib/playlist.cc
@@ -175,10 +175,10 @@ Playlist::set_from_xml (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
/** @param node <Playlist> node */
void
-Playlist::as_xml (xmlpp::Node* node, bool with_content_paths)
+Playlist::as_xml (xmlpp::Node* node)
{
BOOST_FOREACH (shared_ptr<Content> i, _content) {
- i->as_xml (node->add_child ("Content"), with_content_paths);
+ i->as_xml (node->add_child ("Content"));
}
}
diff --git a/src/lib/playlist.h b/src/lib/playlist.h
index 0a5c087de..e84b51a73 100644
--- a/src/lib/playlist.h
+++ b/src/lib/playlist.h
@@ -45,7 +45,7 @@ public:
Playlist ();
~Playlist ();
- void as_xml (xmlpp::Node *, bool with_content_paths);
+ void as_xml (xmlpp::Node *);
void set_from_xml (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int, std::list<std::string> &);
void add (boost::shared_ptr<Content>);
diff --git a/src/lib/text_subtitle_content.cc b/src/lib/text_subtitle_content.cc
index 08722a065..63144766a 100644
--- a/src/lib/text_subtitle_content.cc
+++ b/src/lib/text_subtitle_content.cc
@@ -75,10 +75,10 @@ TextSubtitleContent::technical_summary () const
}
void
-TextSubtitleContent::as_xml (xmlpp::Node* node, bool with_paths) const
+TextSubtitleContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("TextSubtitle");
- Content::as_xml (node, with_paths);
+ Content::as_xml (node);
if (subtitle) {
subtitle->as_xml (node);
diff --git a/src/lib/text_subtitle_content.h b/src/lib/text_subtitle_content.h
index fd0bad12a..3b9d396f6 100644
--- a/src/lib/text_subtitle_content.h
+++ b/src/lib/text_subtitle_content.h
@@ -38,7 +38,7 @@ public:
void examine (boost::shared_ptr<Job>);
std::string summary () const;
std::string technical_summary () const;
- void as_xml (xmlpp::Node *, bool with_paths) const;
+ void as_xml (xmlpp::Node *) const;
DCPTime full_length () const;
private:
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 1fccb992a..d4695f1fa 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -143,7 +143,6 @@ enum {
ID_file_new = 1,
ID_file_open,
ID_file_save,
- ID_file_save_as_template,
ID_file_history,
/* Allow spare IDs after _history for the recent files list */
ID_content_scale_to_fit_width = 100,
@@ -211,7 +210,6 @@ public:
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_new, this), ID_file_new);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_open, this), ID_file_open);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_save, this), ID_file_save);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_save_as_template, this), ID_file_save_as_template);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_history, this, _1), ID_file_history, ID_file_history + HISTORY_SIZE);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_exit, this), wxID_EXIT);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::edit_preferences, this), wxID_PREFERENCES);
@@ -341,7 +339,7 @@ private:
SetTitle (std_to_wx (s));
}
- void file_new (bool from_template)
+ void file_new ()
{
NewFilmDialog* d = new NewFilmDialog (this);
int const r = d->ShowModal ();
@@ -368,7 +366,7 @@ private:
}
if (maybe_save_then_delete_film ()) {
- new_film (d->get_path(), d->template_name());
+ new_film (d->get_path ());
}
}
@@ -406,22 +404,6 @@ private:
_film->write_metadata ();
}
- void file_save_as_template ()
- {
- SaveTemplateDialog* td = new SaveTemplateDialog (this);
- int const r = d->ShowModal ();
- if (r == wxID_OK) {
- bool ok = true;
- if (Config::instance()->existing_template (r->name ())) {
- ok = confirm_dialog (td, _("There is already a template with this name. Do you want to overwrite it?"));
- }
- if (ok) {
- Config::instance()->save_template (_film, r->name ());
- }
- }
- d->Destroy ();
- }
-
void file_history (wxCommandEvent& event)
{
vector<boost::filesystem::path> history = Config::instance()->history ();
@@ -844,8 +826,6 @@ private:
add_item (_file_menu, _("&Open...\tCtrl-O"), ID_file_open, ALWAYS);
_file_menu->AppendSeparator ();
add_item (_file_menu, _("&Save\tCtrl-S"), ID_file_save, NEEDS_FILM);
- _file_menu->AppendSeparator ();
- add_item (_file_menu, _("&Save as template"), ID_file_save_as_template, NEEDS_FILM);
_history_position = _file_menu->GetMenuItems().GetCount();
diff --git a/src/wx/new_film_dialog.cc b/src/wx/new_film_dialog.cc
index 4883810d0..04b9e1057 100644
--- a/src/wx/new_film_dialog.cc
+++ b/src/wx/new_film_dialog.cc
@@ -46,10 +46,6 @@ NewFilmDialog::NewFilmDialog (wxWindow* parent)
_folder = new wxDirPickerCtrl (this, wxID_ANY, wxEmptyString, wxDirSelectorPromptStr, wxDefaultPosition, wxSize (300, -1));
#endif
- _use_template = new wxCheckButton (this, wxID_ANY, _("From template"));
- add (_use_template);
- _template_name = new wxChoice (this, wxID_ANY);
-
if (!_directory) {
_directory = Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir()));
}
@@ -58,23 +54,10 @@ NewFilmDialog::NewFilmDialog (wxWindow* parent)
add (_folder);
_name->SetFocus ();
- _template_name->Enable (false);
-
- BOOST_FOREACH (string i, Config::instance()->template_names ()) {
- _template_name->Append (std_to_wx (i));
- }
-
- _use_template->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, bind (&NewFilmDialog::use_template_clicked, this));
layout ();
}
-void
-NewFilmDialog::use_template_clicked ()
-{
- _template_name->Enable (_use_template->GetValue ());
-}
-
NewFilmDialog::~NewFilmDialog ()
{
_directory = wx_to_std (_folder->GetPath ());
@@ -88,13 +71,3 @@ NewFilmDialog::get_path () const
p /= wx_to_std (_name->GetValue ());
return p;
}
-
-optional<string>
-NewFilmDialog::template_name () const
-{
- if (!_use_template->GetValue ()) {
- return optional<string> ();
- }
-
- return wx_to_std (_template_name->GetValue ());
-}
diff --git a/src/wx/new_film_dialog.h b/src/wx/new_film_dialog.h
index 4096b4303..6dc83d815 100644
--- a/src/wx/new_film_dialog.h
+++ b/src/wx/new_film_dialog.h
@@ -31,8 +31,7 @@ public:
NewFilmDialog (wxWindow *);
~NewFilmDialog ();
- boost::filesystem::path path () const;
- boost::optional<std::string> template_name () const;
+ boost::filesystem::path get_path () const;
private:
wxTextCtrl* _name;
@@ -41,7 +40,5 @@ private:
#else
wxDirPickerCtrl* _folder;
#endif
- wxCheckButton* _use_template;
- wxChoice* _template_name;
static boost::optional<boost::filesystem::path> _directory;
};
diff --git a/src/wx/wscript b/src/wx/wscript
index 1f9aed6b3..ee77e6c20 100644
--- a/src/wx/wscript
+++ b/src/wx/wscript
@@ -75,7 +75,6 @@ sources = """
repeat_dialog.cc
report_problem_dialog.cc
rgba_colour_picker.cc
- save_template_dialog.cc
screen_dialog.cc
screens_panel.cc
self_dkdm_dialog.cc