diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-09-02 23:12:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-09-03 20:25:09 +0100 |
| commit | 139917b9200bfa336078a00db5bb9a4add30cdcd (patch) | |
| tree | a0bb76d9d7259499b76edff4a95dc135de2bce5f /src/tools | |
| parent | 61a78ca5d3fcd6e820630ae1caf3be7310806cc8 (diff) | |
Try to make Cmd+W work on OS X (#934).
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index f90f27c30..a0dde813d 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -314,13 +314,22 @@ public: overall_panel->SetSizer (main_sizer); - wxAcceleratorEntry accel[2]; +#ifdef __WXOSX__ + int accelerators = 3; +#else + int accelerators = 2; +#endif + wxAcceleratorEntry* accel = new wxAcceleratorEntry[accelerators]; accel[0].Set (wxACCEL_CTRL, static_cast<int>('A'), ID_add_file); accel[1].Set (wxACCEL_NORMAL, WXK_DELETE, ID_remove); +#ifdef __WXOSX__ + accel[2].Set (wxACCEL_CTRL, static_cast<int>('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); - wxAcceleratorTable accel_table (2, accel); + wxAcceleratorTable accel_table (accelerators, accel); SetAcceleratorTable (accel_table); + delete[] accel; UpdateChecker::instance()->StateChanged.connect (boost::bind (&DOMFrame::update_checker_state_changed, this)); } |
