Merge master.
authorCarl Hetherington <cth@carlh.net>
Mon, 29 Sep 2014 12:49:54 +0000 (13:49 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 29 Sep 2014 12:49:54 +0000 (13:49 +0100)
1  2 
ChangeLog
src/lib/writer.cc
src/tools/dcpomatic.cc
src/wx/content_panel.h
src/wx/film_editor.h

diff --cc ChangeLog
index 57ec197eab5bad7dbcb268f5088a4d2987ad5489,f676d6b99dea3a4e6163b193d8ffdca43b1c559e..a8927a5471b975ca4ef4b64761403e5b42e5fa32
+++ b/ChangeLog
@@@ -1,11 -1,11 +1,19 @@@
 +2014-09-22  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.11 released.
 +
 +2014-09-18  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.10 released.
 +
+ 2014-09-28  Carl Hetherington  <cth@carlh.net>
+       * Version 1.73.8 released.
+ 2014-09-28  Carl Hetherington  <cth@carlh.net>
+       * Add a few key shortcuts.
  2014-09-16  Carl Hetherington  <cth@carlh.net>
  
        * Version 1.73.7 released.
index a023d5cd2e1cc28992573e180bc2ccd9cc540cbc,5af1aea1e1d8f15ea25c27017f60e9817cb55c9e..6262525c85d3a5777ead7a9dda416d7752622d52
@@@ -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 */
  
index 8a0aa245e7d995680a91cc8a434b9ad337d36e73,fa89a4871e77d071940bacb8494b29dda26311d4..01aa0158b5b7596f5cc96f1008e0caad91ce6621
@@@ -189,6 -188,12 +191,12 @@@ public
  
                Bind (wxEVT_CLOSE_WINDOW, boost::bind (&Frame::close, this, _1));
  
 -              Bind (wxEVT_MENU, boost::bind (&FilmEditor::content_add_file_clicked, _film_editor), ID_add_file);
+               wxAcceleratorEntry accel[1];
+               accel[0].Set (wxACCEL_CTRL, static_cast<int>('A'), 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.
                */
index 1f64d51c63bd8bf86332f9574b32efb54e0c60af,0000000000000000000000000000000000000000..ab198411ddf5b9296aa19aab163621af55b34bb4
mode 100644,000000..100644
--- /dev/null
@@@ -1,102 -1,0 +1,103 @@@
-       void add_file_clicked ();
 +/*
 +    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
 +
 +    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 <list>
 +#include <boost/shared_ptr.hpp>
 +#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<Film>);
 +
 +      boost::shared_ptr<Film> film () const {
 +              return _film;
 +      }
 +
 +      void set_film (boost::shared_ptr<Film> f);
 +      void set_general_sensitivity (bool s);
 +      void set_selection (boost::weak_ptr<Content>);
 +
 +      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_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<ContentSubPanel *> _panels;
 +      ContentMenu* _menu;
 +      TimelineDialog* _timeline_dialog;
 +
 +      boost::shared_ptr<Film> _film;
 +      bool _generally_sensitive;
 +};
index b311184fae003a73bf5da5dd6e39c29abea89f07,ba9ff6fa0cad78924f0b062fb7ab258135f5a9e5..25749fffaf10ec8d3120ee1f02a442fa31ecde11
@@@ -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);