2 Copyright (C) 2017-2018 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
22 #include "wx/wx_signal_manager.h"
23 #include "wx/wx_util.h"
24 #include "wx/about_dialog.h"
25 #include "wx/report_problem_dialog.h"
26 #include "wx/film_viewer.h"
27 #include "wx/player_information.h"
28 #include "wx/update_dialog.h"
29 #include "wx/player_config_dialog.h"
30 #include "wx/verify_dcp_dialog.h"
31 #include "wx/controls.h"
32 #include "lib/cross.h"
33 #include "lib/config.h"
35 #include "lib/update_checker.h"
36 #include "lib/compose.hpp"
37 #include "lib/dcp_content.h"
38 #include "lib/job_manager.h"
41 #include "lib/video_content.h"
42 #include "lib/text_content.h"
43 #include "lib/ratio.h"
44 #include "lib/verify_dcp_job.h"
45 #include "lib/dcp_examiner.h"
46 #include "lib/examine_content_job.h"
47 #include "lib/server.h"
48 #include "lib/dcpomatic_socket.h"
50 #include <wx/stdpaths.h>
51 #include <wx/splash.h>
52 #include <wx/cmdline.h>
53 #include <wx/preferences.h>
54 #include <wx/progdlg.h>
56 #include <ApplicationServices/ApplicationServices.h>
58 #include <boost/bind.hpp>
72 using boost::shared_ptr;
73 using boost::scoped_array;
74 using boost::optional;
75 using boost::dynamic_pointer_cast;
84 /* Allow spare IDs after _history for the recent files list */
87 /* Allow spare IDs for CPLs */
88 ID_view_full_screen = 200,
89 ID_view_closed_captions,
90 ID_view_scale_appropriate,
93 ID_view_scale_quarter,
94 ID_help_report_a_problem,
96 ID_tools_check_for_updates,
97 /* IDs for shortcuts (with no associated menu item) */
103 class DOMFrame : public wxFrame
107 : wxFrame (0, -1, _("DCP-o-matic Player"))
108 , _update_news_requested (false)
111 , _full_screen (false)
114 , _history_position (0)
115 , _history_separator (0)
118 #if defined(DCPOMATIC_WINDOWS)
119 maybe_open_console ();
120 cout << "DCP-o-matic Player is starting." << "\n";
123 wxMenuBar* bar = new wxMenuBar;
125 set_menu_sensitivity ();
128 #ifdef DCPOMATIC_WINDOWS
129 SetIcon (wxIcon (std_to_wx ("id")));
132 _config_changed_connection = Config::instance()->Changed.connect (boost::bind (&DOMFrame::config_changed, this));
135 Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_open, this), ID_file_open);
136 Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_add_ov, this), ID_file_add_ov);
137 Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_add_kdm, this), ID_file_add_kdm);
138 Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_history, this, _1), ID_file_history, ID_file_history + HISTORY_SIZE);
139 Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_close, this), ID_file_close);
140 Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_exit, this), wxID_EXIT);
141 Bind (wxEVT_MENU, boost::bind (&DOMFrame::edit_preferences, this), wxID_PREFERENCES);
142 Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_full_screen, this), ID_view_full_screen);
143 Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_closed_captions, this), ID_view_closed_captions);
144 Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_cpl, this, _1), ID_view_cpl, ID_view_cpl + MAX_CPLS);
145 Bind (wxEVT_MENU, boost::bind (&DOMFrame::set_decode_reduction, this, optional<int>(0)), ID_view_scale_full);
146 Bind (wxEVT_MENU, boost::bind (&DOMFrame::set_decode_reduction, this, optional<int>(1)), ID_view_scale_half);
147 Bind (wxEVT_MENU, boost::bind (&DOMFrame::set_decode_reduction, this, optional<int>(2)), ID_view_scale_quarter);
148 Bind (wxEVT_MENU, boost::bind (&DOMFrame::help_about, this), wxID_ABOUT);
149 Bind (wxEVT_MENU, boost::bind (&DOMFrame::help_report_a_problem, this), ID_help_report_a_problem);
150 Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_verify, this), ID_tools_verify);
151 Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_check_for_updates, this), ID_tools_check_for_updates);
153 /* Use a panel as the only child of the Frame so that we avoid
154 the dark-grey background on Windows.
156 _overall_panel = new wxPanel (this, wxID_ANY);
158 _viewer.reset (new FilmViewer (_overall_panel));
159 _controls = new Controls (_overall_panel, _viewer);
160 _viewer->set_dcp_decode_reduction (Config::instance()->decode_reduction ());
161 _info = new PlayerInformation (_overall_panel, _viewer);
162 wxSizer* main_sizer = new wxBoxSizer (wxVERTICAL);
163 main_sizer->Add (_viewer->panel(), 1, wxEXPAND);
164 main_sizer->Add (_controls, 0, wxEXPAND | wxALL, 6);
165 main_sizer->Add (_info, 0, wxEXPAND | wxALL, 6);
166 _overall_panel->SetSizer (main_sizer);
169 int accelerators = 4;
171 int accelerators = 3;
174 wxAcceleratorEntry* accel = new wxAcceleratorEntry[accelerators];
175 accel[0].Set(wxACCEL_NORMAL, WXK_SPACE, ID_start_stop);
176 accel[1].Set(wxACCEL_NORMAL, WXK_LEFT, ID_back_frame);
177 accel[2].Set(wxACCEL_NORMAL, WXK_RIGHT, ID_forward_frame);
179 accel[3].Set(wxACCEL_CTRL, static_cast<int>('W'), ID_file_close);
181 wxAcceleratorTable accel_table (accelerators, accel);
182 SetAcceleratorTable (accel_table);
185 Bind (wxEVT_MENU, boost::bind (&DOMFrame::start_stop_pressed, this), ID_start_stop);
186 Bind (wxEVT_MENU, boost::bind (&DOMFrame::back_frame, this), ID_back_frame);
187 Bind (wxEVT_MENU, boost::bind (&DOMFrame::forward_frame, this), ID_forward_frame);
189 UpdateChecker::instance()->StateChanged.connect (boost::bind (&DOMFrame::update_checker_state_changed, this));
192 void set_decode_reduction (optional<int> reduction)
194 _viewer->set_dcp_decode_reduction (reduction);
195 _info->triggered_update ();
196 Config::instance()->set_decode_reduction (reduction);
199 void load_dcp (boost::filesystem::path dir)
201 _film.reset (new Film (optional<boost::filesystem::path>()));
202 shared_ptr<DCPContent> dcp;
204 dcp.reset (new DCPContent (_film, dir));
205 } catch (boost::filesystem::filesystem_error& e) {
206 error_dialog (this, _("Could not load DCP"), std_to_wx (e.what()));
210 _film->examine_and_add_content (dcp, true);
211 bool const ok = progress (_("Loading DCP"));
212 if (!ok || !report_errors_from_last_job()) {
216 setup_from_dcp (dcp);
218 if (dcp->three_d()) {
219 _film->set_three_d (true);
222 _viewer->set_film (_film);
223 _viewer->seek (DCPTime(), true);
224 _info->triggered_update ();
226 Config::instance()->add_to_player_history (dir);
228 set_menu_sensitivity ();
230 wxMenuItemList old = _cpl_menu->GetMenuItems();
231 for (wxMenuItemList::iterator i = old.begin(); i != old.end(); ++i) {
232 _cpl_menu->Remove (*i);
235 DCPExaminer ex (dcp);
236 int id = ID_view_cpl;
237 BOOST_FOREACH (shared_ptr<dcp::CPL> i, ex.cpls()) {
238 wxMenuItem* j = _cpl_menu->AppendRadioItem(
240 wxString::Format("%s (%s)", std_to_wx(i->annotation_text()).data(), std_to_wx(i->id()).data())
242 j->Check(!dcp->cpl() || i->id() == *dcp->cpl());
249 void setup_menu (wxMenuBar* m)
251 _file_menu = new wxMenu;
252 _file_menu->Append (ID_file_open, _("&Open...\tCtrl-O"));
253 _file_add_ov = _file_menu->Append (ID_file_add_ov, _("&Add OV..."));
254 _file_add_kdm = _file_menu->Append (ID_file_add_kdm, _("&Add KDM..."));
256 _history_position = _file_menu->GetMenuItems().GetCount();
258 _file_menu->AppendSeparator ();
259 _file_menu->Append (ID_file_close, _("&Close"));
260 _file_menu->AppendSeparator ();
263 _file_menu->Append (wxID_EXIT, _("&Exit"));
265 _file_menu->Append (wxID_EXIT, _("&Quit"));
269 _file_menu->Append (wxID_PREFERENCES, _("&Preferences...\tCtrl-P"));
271 wxMenu* edit = new wxMenu;
272 edit->Append (wxID_PREFERENCES, _("&Preferences...\tCtrl-P"));
275 _cpl_menu = new wxMenu;
277 wxMenu* view = new wxMenu;
278 optional<int> c = Config::instance()->decode_reduction();
279 _view_cpl = view->Append(ID_view_cpl, _("CPL"), _cpl_menu);
280 view->AppendCheckItem(ID_view_full_screen, _("Full screen\tF11"))->Check(_full_screen);
281 view->Append(ID_view_closed_captions, _("Closed captions..."));
282 view->AppendSeparator();
283 view->AppendRadioItem(ID_view_scale_appropriate, _("Set decode resolution to match display"))->Check(!static_cast<bool>(c));
284 view->AppendRadioItem(ID_view_scale_full, _("Decode at full resolution"))->Check(c && c.get() == 0);
285 view->AppendRadioItem(ID_view_scale_half, _("Decode at half resolution"))->Check(c && c.get() == 1);
286 view->AppendRadioItem(ID_view_scale_quarter, _("Decode at quarter resolution"))->Check(c && c.get() == 2);
288 wxMenu* tools = new wxMenu;
289 _tools_verify = tools->Append (ID_tools_verify, _("Verify DCP"));
290 tools->AppendSeparator ();
291 tools->Append (ID_tools_check_for_updates, _("Check for updates"));
293 wxMenu* help = new wxMenu;
295 help->Append (wxID_ABOUT, _("About DCP-o-matic"));
297 help->Append (wxID_ABOUT, _("About"));
299 help->Append (ID_help_report_a_problem, _("Report a problem..."));
301 m->Append (_file_menu, _("&File"));
303 m->Append (edit, _("&Edit"));
305 m->Append (view, _("&View"));
306 m->Append (tools, _("&Tools"));
307 m->Append (help, _("&Help"));
312 wxString d = wxStandardPaths::Get().GetDocumentsDir();
313 if (Config::instance()->last_player_load_directory()) {
314 d = std_to_wx (Config::instance()->last_player_load_directory()->string());
317 wxDirDialog* c = new wxDirDialog (this, _("Select DCP to open"), d, wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
322 if (r == wxID_OK && c->GetPath() == wxStandardPaths::Get().GetDocumentsDir()) {
323 error_dialog (this, _("You did not select a folder. Make sure that you select a folder before clicking Open."));
330 boost::filesystem::path const dcp (wx_to_std (c->GetPath ()));
332 Config::instance()->set_last_player_load_directory (dcp.parent_path());
340 wxDirDialog* c = new wxDirDialog (
342 _("Select DCP to open as OV"),
343 wxStandardPaths::Get().GetDocumentsDir(),
344 wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST
350 if (r == wxID_OK && c->GetPath() == wxStandardPaths::Get().GetDocumentsDir()) {
351 error_dialog (this, _("You did not select a folder. Make sure that you select a folder before clicking Open."));
358 DCPOMATIC_ASSERT (_film);
359 shared_ptr<DCPContent> dcp = boost::dynamic_pointer_cast<DCPContent>(_film->content().front());
360 DCPOMATIC_ASSERT (dcp);
361 dcp->add_ov (wx_to_std(c->GetPath()));
362 JobManager::instance()->add(shared_ptr<Job>(new ExamineContentJob (_film, dcp)));
363 bool const ok = progress (_("Loading DCP"));
364 if (!ok || !report_errors_from_last_job()) {
367 setup_from_dcp (dcp);
371 _info->triggered_update ();
376 wxFileDialog* d = new wxFileDialog (this, _("Select KDM"));
378 if (d->ShowModal() == wxID_OK) {
379 DCPOMATIC_ASSERT (_film);
380 shared_ptr<DCPContent> dcp = boost::dynamic_pointer_cast<DCPContent>(_film->content().front());
381 DCPOMATIC_ASSERT (dcp);
383 dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()), MAX_KDM_SIZE)));
384 dcp->examine (shared_ptr<Job>());
385 } catch (exception& e) {
386 error_dialog (this, wxString::Format (_("Could not load KDM.")), std_to_wx(e.what()));
393 _info->triggered_update ();
396 void file_history (wxCommandEvent& event)
398 vector<boost::filesystem::path> history = Config::instance()->player_history ();
399 int n = event.GetId() - ID_file_history;
400 if (n >= 0 && n < static_cast<int> (history.size ())) {
401 load_dcp (history[n]);
407 _viewer->set_film (shared_ptr<Film>());
409 _info->triggered_update ();
410 set_menu_sensitivity ();
418 void edit_preferences ()
420 if (!_config_dialog) {
421 _config_dialog = create_player_config_dialog ();
423 _config_dialog->Show (this);
426 void view_cpl (wxCommandEvent& ev)
428 shared_ptr<DCPContent> dcp = boost::dynamic_pointer_cast<DCPContent>(_film->content().front());
429 DCPOMATIC_ASSERT (dcp);
430 DCPExaminer ex (dcp);
431 int id = ev.GetId() - ID_view_cpl;
432 DCPOMATIC_ASSERT (id >= 0);
433 DCPOMATIC_ASSERT (id < int(ex.cpls().size()));
434 list<shared_ptr<dcp::CPL> > cpls = ex.cpls();
435 list<shared_ptr<dcp::CPL> >::iterator i = cpls.begin();
441 dcp->set_cpl ((*i)->id());
442 dcp->examine (shared_ptr<Job>());
445 void view_full_screen ()
447 _full_screen = !_full_screen;
448 _controls->Show (!_full_screen);
449 _info->Show (!_full_screen);
450 _overall_panel->SetBackgroundColour (_full_screen ? wxColour(0, 0, 0) : wxNullColour);
451 ShowFullScreen (_full_screen);
454 void view_closed_captions ()
456 _viewer->show_closed_captions ();
461 shared_ptr<DCPContent> dcp = boost::dynamic_pointer_cast<DCPContent>(_film->content().front());
462 DCPOMATIC_ASSERT (dcp);
464 JobManager* jm = JobManager::instance ();
465 jm->add (shared_ptr<Job> (new VerifyDCPJob (dcp->directories())));
466 bool const ok = progress (_("Verifying DCP"));
471 DCPOMATIC_ASSERT (!jm->get().empty());
472 shared_ptr<VerifyDCPJob> last = dynamic_pointer_cast<VerifyDCPJob> (jm->get().back());
473 DCPOMATIC_ASSERT (last);
475 VerifyDCPDialog* d = new VerifyDCPDialog (this, last);
480 void tools_check_for_updates ()
482 UpdateChecker::instance()->run ();
483 _update_news_requested = true;
488 AboutDialog* d = new AboutDialog (this);
493 void help_report_a_problem ()
495 ReportProblemDialog* d = new ReportProblemDialog (this);
496 if (d->ShowModal () == wxID_OK) {
502 void update_checker_state_changed ()
504 UpdateChecker* uc = UpdateChecker::instance ();
506 bool const announce =
507 _update_news_requested ||
508 (uc->stable() && Config::instance()->check_for_updates()) ||
509 (uc->test() && Config::instance()->check_for_updates() && Config::instance()->check_for_test_updates());
511 _update_news_requested = false;
517 if (uc->state() == UpdateChecker::YES) {
518 UpdateDialog* dialog = new UpdateDialog (this, uc->stable (), uc->test ());
519 dialog->ShowModal ();
521 } else if (uc->state() == UpdateChecker::FAILED) {
522 error_dialog (this, _("The DCP-o-matic download server could not be contacted."));
524 error_dialog (this, _("There are no new versions of DCP-o-matic available."));
527 _update_news_requested = false;
530 void config_changed ()
532 /* Instantly save any config changes when using the player GUI */
534 Config::instance()->write_config();
535 } catch (exception& e) {
539 _("Could not write to config file at %s. Your changes have not been saved."),
540 std_to_wx (Config::instance()->cinemas_file().string()).data()
545 for (int i = 0; i < _history_items; ++i) {
546 delete _file_menu->Remove (ID_file_history + i);
549 if (_history_separator) {
550 _file_menu->Remove (_history_separator);
552 delete _history_separator;
553 _history_separator = 0;
555 int pos = _history_position;
557 vector<boost::filesystem::path> history = Config::instance()->player_history ();
559 if (!history.empty ()) {
560 _history_separator = _file_menu->InsertSeparator (pos++);
563 for (size_t i = 0; i < history.size(); ++i) {
566 s = String::compose ("&%1 %2", i + 1, history[i].string());
568 s = history[i].string();
570 _file_menu->Insert (pos++, ID_file_history + i, std_to_wx (s));
573 _history_items = history.size ();
576 void set_menu_sensitivity ()
578 _tools_verify->Enable (static_cast<bool>(_film));
579 _file_add_ov->Enable (static_cast<bool>(_film));
580 _file_add_kdm->Enable (static_cast<bool>(_film));
581 _view_cpl->Enable (static_cast<bool>(_film));
584 void start_stop_pressed ()
586 if (_viewer->playing()) {
595 _viewer->seek_by (-_viewer->one_video_frame(), true);
598 void forward_frame ()
600 _viewer->seek_by (_viewer->one_video_frame(), true);
605 /** @return false if the task was cancelled */
606 bool progress (wxString task)
608 JobManager* jm = JobManager::instance ();
610 wxProgressDialog* progress = new wxProgressDialog (_("DCP-o-matic Player"), task, 100, 0, wxPD_CAN_ABORT);
614 while (jm->work_to_do() || signal_manager->ui_idle()) {
616 if (!progress->Pulse()) {
617 /* user pressed cancel */
618 BOOST_FOREACH (shared_ptr<Job> i, jm->get()) {
626 progress->Destroy ();
630 bool report_errors_from_last_job ()
632 JobManager* jm = JobManager::instance ();
634 DCPOMATIC_ASSERT (!jm->get().empty());
636 shared_ptr<Job> last = jm->get().back();
637 if (last->finished_in_error()) {
638 error_dialog(this, std_to_wx(last->error_summary()) + ".\n", std_to_wx(last->error_details()));
645 void setup_from_dcp (shared_ptr<DCPContent> dcp)
647 BOOST_FOREACH (shared_ptr<TextContent> i, dcp->text) {
652 Ratio const * r = Ratio::nearest_from_ratio(dcp->video->size().ratio());
654 _film->set_container(r);
659 bool _update_news_requested;
660 PlayerInformation* _info;
661 wxPreferencesEditor* _config_dialog;
663 wxPanel* _overall_panel;
665 wxMenuItem* _view_cpl;
668 int _history_position;
669 wxMenuItem* _history_separator;
670 shared_ptr<FilmViewer> _viewer;
672 boost::shared_ptr<Film> _film;
673 boost::signals2::scoped_connection _config_changed_connection;
674 wxMenuItem* _file_add_ov;
675 wxMenuItem* _file_add_kdm;
676 wxMenuItem* _tools_verify;
679 static const wxCmdLineEntryDesc command_line_description[] = {
680 { wxCMD_LINE_PARAM, 0, 0, "DCP to load or create", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
681 { wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 }
684 class PlayServer : public Server
687 explicit PlayServer (DOMFrame* frame)
688 : Server (PLAYER_PLAY_PORT)
692 void handle (shared_ptr<Socket> socket)
695 int const length = socket->read_uint32 ();
696 scoped_array<char> buffer (new char[length]);
697 socket->read (reinterpret_cast<uint8_t*> (buffer.get()), length);
698 string s (buffer.get());
699 signal_manager->when_idle (bind (&DOMFrame::load_dcp, _frame, s));
700 socket->write (reinterpret_cast<uint8_t const *> ("OK"), 3);
711 * @brief The magic App class for wxWidgets.
713 class App : public wxApp
726 wxInitAllImageHandlers ();
728 Config::FailedToLoad.connect (boost::bind (&App::config_failed_to_load, this));
729 Config::Warning.connect (boost::bind (&App::config_warning, this, _1));
731 wxSplashScreen* splash = maybe_show_splash ();
733 SetAppName (_("DCP-o-matic Player"));
735 if (!wxApp::OnInit()) {
739 #ifdef DCPOMATIC_LINUX
740 unsetenv ("UBUNTU_MENUPROXY");
744 ProcessSerialNumber serial;
745 GetCurrentProcess (&serial);
746 TransformProcessType (&serial, kProcessTransformToForegroundApplication);
749 dcpomatic_setup_path_encoding ();
751 /* Enable i18n; this will create a Config object
752 to look for a force-configured language. This Config
753 object will be wrong, however, because dcpomatic_setup
754 hasn't yet been called and there aren't any filters etc.
757 dcpomatic_setup_i18n ();
759 /* Set things up, including filters etc.
760 which will now be internationalised correctly.
764 /* Force the configuration to be re-loaded correctly next
769 _frame = new DOMFrame ();
770 SetTopWindow (_frame);
777 signal_manager = new wxSignalManager (this);
779 PlayServer* server = new PlayServer (_frame);
780 new thread (boost::bind (&PlayServer::run, server));
782 if (!_dcp_to_load.empty() && boost::filesystem::is_directory (_dcp_to_load)) {
784 _frame->load_dcp (_dcp_to_load);
785 } catch (exception& e) {
786 error_dialog (0, std_to_wx (String::compose (wx_to_std (_("Could not load DCP %1.")), _dcp_to_load)), std_to_wx(e.what()));
790 Bind (wxEVT_IDLE, boost::bind (&App::idle, this));
792 if (Config::instance()->check_for_updates ()) {
793 UpdateChecker::instance()->run ();
800 error_dialog (0, _("DCP-o-matic Player could not start."), std_to_wx(e.what()));
804 void OnInitCmdLine (wxCmdLineParser& parser)
806 parser.SetDesc (command_line_description);
807 parser.SetSwitchChars (wxT ("-"));
810 bool OnCmdLineParsed (wxCmdLineParser& parser)
812 if (parser.GetParamCount() > 0) {
813 _dcp_to_load = wx_to_std (parser.GetParam (0));
819 void report_exception ()
823 } catch (FileError& e) {
827 _("An exception occurred: %s (%s)\n\n") + REPORT_PROBLEM,
828 std_to_wx (e.what()),
829 std_to_wx (e.file().string().c_str ())
832 } catch (exception& e) {
836 _("An exception occurred: %s.\n\n") + REPORT_PROBLEM,
837 std_to_wx (e.what ())
841 error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
845 /* An unhandled exception has occurred inside the main event loop */
846 bool OnExceptionInMainLoop ()
849 /* This will terminate the program */
853 void OnUnhandledException ()
860 signal_manager->ui_idle ();
863 void config_failed_to_load ()
865 message_dialog (_frame, _("The existing configuration failed to load. Default values will be used instead. These may take a short time to create."));
868 void config_warning (string m)
870 message_dialog (_frame, std_to_wx (m));