From: Carl Hetherington Date: Mon, 29 Sep 2014 12:49:54 +0000 (+0100) Subject: Merge master. X-Git-Tag: v2.0.48~575 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=391d85619ac19a2a93696ddc35c222eb9bb5d9d6 Merge master. --- 391d85619ac19a2a93696ddc35c222eb9bb5d9d6 diff --cc ChangeLog index 57ec197ea,f676d6b99..a8927a547 --- a/ChangeLog +++ b/ChangeLog @@@ -1,11 -1,11 +1,19 @@@ +2014-09-22 Carl Hetherington + + * Version 2.0.11 released. + +2014-09-18 Carl Hetherington + + * Version 2.0.10 released. + + 2014-09-28 Carl Hetherington + + * Version 1.73.8 released. + + 2014-09-28 Carl Hetherington + + * Add a few key shortcuts. + 2014-09-16 Carl Hetherington * Version 1.73.7 released. diff --cc src/lib/writer.cc index a023d5cd2,5af1aea1e..6262525c8 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@@ -406,12 -413,18 +407,15 @@@ Writer::finish ( boost::system::error_code ec; boost::filesystem::create_hard_link (video_from, video_to, ec); if (ec) { - /* hard link failed; copy instead */ - boost::filesystem::copy_file (video_from, video_to); - LOG_WARNING_NC ("Hard-link failed; fell back to copying"); + LOG_WARNING_NC ("Hard-link failed; copying instead"); + boost::filesystem::copy_file (video_from, video_to, ec); + if (ec) { + LOG_ERROR ("Failed to copy video file from %1 to %2 (%3)", video_from.string(), video_to.string(), ec.message ()); + throw FileError (ec.message(), video_from); + } } - /* And update the asset */ - - _picture_asset->set_directory (_film->dir (_film->dcp_name ())); - _picture_asset->set_file_name (_film->video_mxf_filename ()); + _picture_mxf->set_file (video_to); /* Move the audio MXF into the DCP */ diff --cc src/tools/dcpomatic.cc index 8a0aa245e,fa89a4871..01aa0158b --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@@ -189,6 -188,12 +191,12 @@@ public Bind (wxEVT_CLOSE_WINDOW, boost::bind (&Frame::close, this, _1)); + wxAcceleratorEntry accel[1]; + accel[0].Set (wxACCEL_CTRL, static_cast('A'), ID_add_file); - Bind (wxEVT_MENU, boost::bind (&FilmEditor::content_add_file_clicked, _film_editor), ID_add_file); ++ Bind (wxEVT_MENU, boost::bind (&ContentPanel::add_file_clicked, _film_editor->content_panel()), ID_add_file); + wxAcceleratorTable accel_table (1, accel); + SetAcceleratorTable (accel_table); + /* Use a panel as the only child of the Frame so that we avoid the dark-grey background on Windows. */ diff --cc src/wx/content_panel.h index 1f64d51c6,000000000..ab198411d mode 100644,000000..100644 --- a/src/wx/content_panel.h +++ b/src/wx/content_panel.h @@@ -1,102 -1,0 +1,103 @@@ +/* + Copyright (C) 2012-2014 Carl Hetherington + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#include +#include +#include "lib/types.h" +#include "lib/film.h" +#include "content_menu.h" + +class wxNotebook; +class wxPanel; +class wxSizer; +class wxListCtrl; +class wxListEvent; +class TimelineDialog; +class FilmEditor; +class ContentSubPanel; +class Film; + +class ContentPanel +{ +public: + ContentPanel (wxNotebook *, boost::shared_ptr); + + boost::shared_ptr film () const { + return _film; + } + + void set_film (boost::shared_ptr f); + void set_general_sensitivity (bool s); + void set_selection (boost::weak_ptr); + + void film_changed (Film::Property p); + void film_content_changed (int p); + + wxPanel* panel () const { + return _panel; + } + + wxNotebook* notebook () const { + return _notebook; + } + + ContentList selected (); + VideoContentList selected_video (); + AudioContentList selected_audio (); + SubtitleContentList selected_subtitle (); + FFmpegContentList selected_ffmpeg (); + ++ void add_file_clicked (); ++ +private: + void sequence_video_changed (); + void selection_changed (); - void add_file_clicked (); + void add_folder_clicked (); + void remove_clicked (); + void earlier_clicked (); + void later_clicked (); + void right_click (wxListEvent &); + void files_dropped (wxDropFilesEvent &); + void timeline_clicked (); + + void setup (); + void setup_sensitivity (); + + wxPanel* _panel; + wxSizer* _sizer; + wxNotebook* _notebook; + wxListCtrl* _content; + wxButton* _add_file; + wxButton* _add_folder; + wxButton* _remove; + wxButton* _earlier; + wxButton* _later; + wxButton* _timeline; + wxCheckBox* _sequence_video; + ContentSubPanel* _video_panel; + ContentSubPanel* _audio_panel; + ContentSubPanel* _subtitle_panel; + ContentSubPanel* _timing_panel; + std::list _panels; + ContentMenu* _menu; + TimelineDialog* _timeline_dialog; + + boost::shared_ptr _film; + bool _generally_sensitive; +}; diff --cc src/wx/film_editor.h index b311184fa,ba9ff6fa0..25749fffa --- a/src/wx/film_editor.h +++ b/src/wx/film_editor.h @@@ -54,7 -63,46 +54,6 @@@ public return _film; } - ContentList selected_content (); - VideoContentList selected_video_content (); - AudioContentList selected_audio_content (); - SubtitleContentList selected_subtitle_content (); - FFmpegContentList selected_ffmpeg_content (); - - void content_add_file_clicked (); - --private: - void make_dcp_panel (); - void make_content_panel (); - void connect_to_widgets (); - - /* Handle changes to the view */ - void name_changed (); - void use_isdcf_name_toggled (); - void edit_isdcf_button_clicked (); - void content_selection_changed (); - void content_add_folder_clicked (); - void content_remove_clicked (); - void content_earlier_clicked (); - void content_later_clicked (); - void content_files_dropped (wxDropFilesEvent& event); - void container_changed (); - void dcp_content_type_changed (); - void scaler_changed (); - void j2k_bandwidth_changed (); - void frame_rate_choice_changed (); - void frame_rate_spin_changed (); - void best_frame_rate_clicked (); - void content_timeline_clicked (); - void audio_channels_changed (); - void resolution_changed (); - void sequence_video_changed (); - void content_right_click (wxListEvent &); - void three_d_changed (); - void standard_changed (); - void signed_toggled (); - void encrypted_toggled (); - /* Handle changes to the model */ void film_changed (Film::Property); void film_content_changed (int);