X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic.cc;h=a0dde813ddf4642d8d7845443d3cfda5407c379e;hb=139917b9200bfa336078a00db5bb9a4add30cdcd;hp=80b25ba2e5dee5549601288f96c73420cba0d16b;hpb=f042aceec251608860118c97ee30c8ae3c54a70f;p=dcpomatic.git diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 80b25ba2e..a0dde813d 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -25,7 +25,7 @@ #include "wx/film_viewer.h" #include "wx/film_editor.h" #include "wx/job_manager_view.h" -#include "wx/config_dialog.h" +#include "wx/full_config_dialog.h" #include "wx/wx_util.h" #include "wx/film_name_location_dialog.h" #include "wx/wx_signal_manager.h" @@ -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('A'), ID_add_file); accel[1].Set (wxACCEL_NORMAL, WXK_DELETE, ID_remove); +#ifdef __WXOSX__ + accel[2].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); - 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)); } @@ -500,7 +509,7 @@ private: void edit_preferences () { if (!_config_dialog) { - _config_dialog = create_config_dialog (); + _config_dialog = create_full_config_dialog (); } _config_dialog->Show (this); } @@ -667,7 +676,7 @@ private: _("You are making a DKDM which is encrypted by a private key held in" "\n\n%s\n\nIt is VITALLY IMPORTANT " "that you BACK UP THIS FILE since if it is lost " - "your DKDMs (and the DCPs they protect) will become useless."), std_to_wx(Config::config_path().string()).data() + "your DKDMs (and the DCPs they protect) will become useless."), std_to_wx(Config::config_file().string()).data() ) ); @@ -1166,6 +1175,7 @@ private: wxInitAllImageHandlers (); Config::FailedToLoad.connect (boost::bind (&App::config_failed_to_load, this)); + Config::Warning.connect (boost::bind (&App::config_warning, this, _1)); wxSplashScreen* splash = 0; try { @@ -1351,6 +1361,11 @@ private: message_dialog (_frame, _("The existing configuration failed to load. Default values will be used instead. These may take a short time to create.")); } + void config_warning (string m) + { + message_dialog (_frame, std_to_wx (m)); + } + DOMFrame* _frame; shared_ptr _timer; string _film_to_load;