+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.
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 */
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.
*/
--- /dev/null
- 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;
+};
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);