From 696ff1c534d59483bed3db06705b554f615a7b85 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 2 Feb 2016 00:04:35 +0000 Subject: Add delete-key shortcut to remove content. --- src/tools/dcpomatic.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/tools') diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 0260cd9a8..b853851d7 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -153,7 +153,8 @@ enum { ID_tools_restore_default_preferences, ID_help_report_a_problem, /* IDs for shortcuts (with no associated menu item) */ - ID_add_file + ID_add_file, + ID_remove }; class DOMFrame : public wxFrame @@ -248,10 +249,12 @@ public: overall_panel->SetSizer (main_sizer); - wxAcceleratorEntry accel[1]; + wxAcceleratorEntry accel[2]; accel[0].Set (wxACCEL_CTRL, static_cast('A'), ID_add_file); + accel[1].Set (wxACCEL_NORMAL, WXK_DELETE, ID_remove); Bind (wxEVT_MENU, boost::bind (&ContentPanel::add_file_clicked, _film_editor->content_panel()), ID_add_file); - wxAcceleratorTable accel_table (1, accel); + Bind (wxEVT_MENU, boost::bind (&ContentPanel::remove_clicked, _film_editor->content_panel()), ID_remove); + wxAcceleratorTable accel_table (2, accel); SetAcceleratorTable (accel_table); /* Instantly save any config changes when using the DCP-o-matic GUI */ -- cgit v1.2.3