diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-03-23 01:28:13 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-03-23 01:28:13 +0000 |
| commit | fe50be9c37b0c93ac87075018488a9716432d8de (patch) | |
| tree | 1f3abf2f8eb5728206487e635b4171a5edf87392 /src | |
| parent | 83cc718cc4f38bc2a9cc8cd62ed570415c5ba289 (diff) | |
Add arrows to player too.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 39826df1b..d7e47081c 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -84,7 +84,9 @@ enum { ID_tools_verify, ID_tools_check_for_updates, /* IDs for shortcuts (with no associated menu item) */ - ID_start_stop + ID_start_stop, + ID_back_frame, + ID_forward_frame }; class DOMFrame : public wxFrame @@ -149,21 +151,25 @@ public: overall_panel->SetSizer (main_sizer); #ifdef __WXOSX__ - int accelerators = 2; + int accelerators = 4; #else - int accelerators = 1; + int accelerators = 3; #endif wxAcceleratorEntry* accel = new wxAcceleratorEntry[accelerators]; accel[0].Set(wxACCEL_NORMAL, WXK_SPACE, ID_start_stop); + accel[1].Set(wxACCEL_NORMAL, WXK_LEFT, ID_back_frame); + accel[2].Set(wxACCEL_NORMAL, WXK_RIGHT, ID_forward_frame); #ifdef __WXOSX__ - accel[1].Set(wxACCEL_CTRL, static_cast<int>('W'), ID_file_close); + accel[3].Set(wxACCEL_CTRL, static_cast<int>('W'), ID_file_close); #endif wxAcceleratorTable accel_table (accelerators, accel); SetAcceleratorTable (accel_table); delete[] accel; Bind (wxEVT_MENU, boost::bind (&DOMFrame::start_stop_pressed, this), ID_start_stop); + Bind (wxEVT_MENU, boost::bind (&DOMFrame::back_frame, this), ID_back_frame); + Bind (wxEVT_MENU, boost::bind (&DOMFrame::forward_frame, this), ID_forward_frame); UpdateChecker::instance()->StateChanged.connect (boost::bind (&DOMFrame::update_checker_state_changed, this)); } @@ -573,6 +579,16 @@ private: } } + void back_frame () + { + _viewer->back_frame (); + } + + void forward_frame () + { + _viewer->forward_frame (); + } + bool _update_news_requested; PlayerInformation* _info; wxPreferencesEditor* _config_dialog; |
