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)
ChangeLog
src/lib/writer.cc
src/tools/dcpomatic.cc
src/wx/content_panel.h
src/wx/film_editor.h

index 57ec197eab5bad7dbcb268f5088a4d2987ad5489..a8927a5471b975ca4ef4b64761403e5b42e5fa32 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,14 @@
 
        * 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..6262525c85d3a5777ead7a9dda416d7752622d52 100644 (file)
@@ -52,6 +52,7 @@
 #define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
 #define LOG_TIMING(...) _film->log()->microsecond_log (String::compose (__VA_ARGS__), Log::TYPE_TIMING);
 #define LOG_WARNING_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_WARNING);
+#define LOG_ERROR(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_ERROR);
 
 /* OS X strikes again */
 #undef set_key
@@ -406,9 +407,12 @@ 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);
+               }
        }
 
        _picture_mxf->set_file (video_to);
index 8a0aa245e7d995680a91cc8a434b9ad337d36e73..01aa0158b5b7596f5cc96f1008e0caad91ce6621 100644 (file)
@@ -126,7 +126,9 @@ enum {
        ID_jobs_show_dcp,
        ID_tools_hints,
        ID_tools_encoding_servers,
-       ID_tools_check_for_updates
+       ID_tools_check_for_updates,
+       /* IDs for shortcuts (with no associated menu item) */
+       ID_add_file
 };
 
 class Frame : public wxFrame
@@ -189,6 +191,12 @@ public:
 
                Bind (wxEVT_CLOSE_WINDOW, boost::bind (&Frame::close, this, _1));
 
+               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.
                */
@@ -592,10 +600,10 @@ private:
        void setup_menu (wxMenuBar* m)
        {
                _file_menu = new wxMenu;
-               add_item (_file_menu, _("New..."), ID_file_new, ALWAYS);
-               add_item (_file_menu, _("&Open..."), ID_file_open, ALWAYS);
+               add_item (_file_menu, _("New...\tCtrl-N"), ID_file_new, ALWAYS);
+               add_item (_file_menu, _("&Open...\tCtrl-O"), ID_file_open, ALWAYS);
                _file_menu->AppendSeparator ();
-               add_item (_file_menu, _("&Save"), ID_file_save, NEEDS_FILM);
+               add_item (_file_menu, _("&Save\tCtrl-S"), ID_file_save, NEEDS_FILM);
                _file_menu->AppendSeparator ();
                add_item (_file_menu, _("&Properties..."), ID_file_properties, NEEDS_FILM);
 
@@ -612,10 +620,10 @@ private:
 #endif 
        
 #ifdef __WXOSX__       
-               add_item (_file_menu, _("&Preferences..."), wxID_PREFERENCES, ALWAYS);
+               add_item (_file_menu, _("&Preferences...\tCtrl-P"), wxID_PREFERENCES, ALWAYS);
 #else
                wxMenu* edit = new wxMenu;
-               add_item (edit, _("&Preferences..."), wxID_PREFERENCES, ALWAYS);
+               add_item (edit, _("&Preferences...\tCtrl-P"), wxID_PREFERENCES, ALWAYS);
 #endif
 
                wxMenu* content = new wxMenu;
@@ -623,13 +631,13 @@ private:
                add_item (content, _("Scale to fit &height"), ID_content_scale_to_fit_height, NEEDS_FILM | NEEDS_SELECTED_VIDEO_CONTENT);
                
                wxMenu* jobs_menu = new wxMenu;
-               add_item (jobs_menu, _("&Make DCP"), ID_jobs_make_dcp, NEEDS_FILM | NOT_DURING_DCP_CREATION);
-               add_item (jobs_menu, _("Make &KDMs..."), ID_jobs_make_kdms, NEEDS_FILM);
+               add_item (jobs_menu, _("&Make DCP\tCtrl-M"), ID_jobs_make_dcp, NEEDS_FILM | NOT_DURING_DCP_CREATION);
+               add_item (jobs_menu, _("Make &KDMs...\tCtrl-K"), ID_jobs_make_kdms, NEEDS_FILM);
                add_item (jobs_menu, _("&Send DCP to TMS"), ID_jobs_send_dcp_to_tms, NEEDS_FILM | NOT_DURING_DCP_CREATION | NEEDS_CPL);
                add_item (jobs_menu, _("S&how DCP"), ID_jobs_show_dcp, NEEDS_FILM | NOT_DURING_DCP_CREATION | NEEDS_CPL);
 
                wxMenu* tools = new wxMenu;
-               add_item (tools, _("Hints..."), ID_tools_hints, 0);
+               add_item (tools, _("Hints...\tCtrl-H"), ID_tools_hints, 0);
                add_item (tools, _("Encoding servers..."), ID_tools_encoding_servers, 0);
                add_item (tools, _("Check for updates"), ID_tools_check_for_updates, 0);
                
index 1f64d51c63bd8bf86332f9574b32efb54e0c60af..ab198411ddf5b9296aa19aab163621af55b34bb4 100644 (file)
@@ -63,10 +63,11 @@ public:
        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 ();
index b311184fae003a73bf5da5dd6e39c29abea89f07..25749fffaf10ec8d3120ee1f02a442fa31ecde11 100644 (file)
@@ -54,7 +54,6 @@ public:
                return _film;
        }
 
-private:
        /* Handle changes to the model */
        void film_changed (Film::Property);
        void film_content_changed (int);