Updated cs_CZ translation from Tomáš Begeni.
[dcpomatic.git] / src / tools / dcpomatic.cc
index 4b79d67ed028e37d2c69888bb72d97c1475eec14..a0dde813ddf4642d8d7845443d3cfda5407c379e 100644 (file)
@@ -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<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));
        }
@@ -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);
        }
@@ -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<wxTimer> _timer;
        string _film_to_load;