From: Carl Hetherington Date: Wed, 31 Jan 2018 22:18:31 +0000 (+0000) Subject: Make Cmd-W close the current file in the player on OS X (part of #1180). X-Git-Tag: v2.11.47~6 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=8c33b64bd3d71641724cee08fa01fb447dbd2eee;p=dcpomatic.git Make Cmd-W close the current file in the player on OS X (part of #1180). --- diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 4425f34d1..930ab0a54 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -133,6 +133,14 @@ public: main_sizer->Add (_info, 0, wxEXPAND | wxALL, 6); overall_panel->SetSizer (main_sizer); +#ifdef __WXOSX__ + wxAcceleratorEntry* accel = new wxAcceleratorEntry[1]; + accel[0].Set(wxACCEL_CTRL, static_cast('W'), ID_file_close); + wxAcceleratorTable accel_table (1, accel); + SetAcceleratorTable (accel_table); + delete[] accel; +#endif + UpdateChecker::instance()->StateChanged.connect (boost::bind (&DOMFrame::update_checker_state_changed, this)); }