From e2361edc2fc2c07d6474bf5a7f76dc2a5b55ee81 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 23 Mar 2018 00:44:59 +0000 Subject: Ctrl-T to open timeline (#1201). --- src/tools/dcpomatic.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/tools') diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 982e38e67..4d888b3fa 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -219,7 +219,8 @@ enum { /* IDs for shortcuts (with no associated menu item) */ ID_add_file, ID_remove, - ID_start_stop + ID_start_stop, + ID_timeline }; class DOMFrame : public wxFrame @@ -329,20 +330,22 @@ public: overall_panel->SetSizer (main_sizer); #ifdef __WXOSX__ - int accelerators = 4; + int accelerators = 5; #else - int accelerators = 3; + int accelerators = 4; #endif wxAcceleratorEntry* accel = new wxAcceleratorEntry[accelerators]; accel[0].Set (wxACCEL_CTRL, static_cast('A'), ID_add_file); accel[1].Set (wxACCEL_NORMAL, WXK_DELETE, ID_remove); accel[2].Set (wxACCEL_NORMAL, WXK_SPACE, ID_start_stop); + accel[3].Set (wxACCEL_CTRL, static_cast('T'), ID_timeline); #ifdef __WXOSX__ - accel[3].Set (wxACCEL_CTRL, static_cast('W'), wxID_EXIT); + accel[4].Set (wxACCEL_CTRL, static_cast('W'), wxID_EXIT); #endif Bind (wxEVT_MENU, boost::bind (&ContentPanel::add_file_clicked, _film_editor->content_panel()), ID_add_file); Bind (wxEVT_MENU, boost::bind (&DOMFrame::remove_clicked, this, _1), ID_remove); Bind (wxEVT_MENU, boost::bind (&DOMFrame::start_stop_pressed, this), ID_start_stop); + Bind (wxEVT_MENU, boost::bind (&DOMFrame::timeline_pressed, this), ID_timeline); wxAcceleratorTable accel_table (accelerators, accel); SetAcceleratorTable (accel_table); delete[] accel; @@ -1213,6 +1216,11 @@ private: } } + void timeline_pressed () + { + _film_editor->content_panel()->timeline_clicked (); + } + FilmEditor* _film_editor; FilmViewer* _film_viewer; VideoWaveformDialog* _video_waveform_dialog; -- cgit v1.2.3