X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_batch.cc;h=6e054edf8d8921b2b3793bfe4dcebe398f7d514a;hb=790db8faab093231664c402fcc33b0b96687e222;hp=79f1b39fa0f7080efda7cef3c9759bb5f37410dd;hpb=3c29aa6531a4046a8db72dcac81189eb8893233c;p=dcpomatic.git diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc index 79f1b39fa..6e054edf8 100644 --- a/src/tools/dcpomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -401,7 +401,7 @@ class App : public wxApp SetAppName (_("DCP-o-matic Batch Converter")); is_batch_converter = true; - Config::FailedToLoad.connect (boost::bind(&App::config_failed_to_load, this)); + Config::FailedToLoad.connect(boost::bind(&App::config_failed_to_load, this, _1)); Config::Warning.connect (boost::bind(&App::config_warning, this, _1)); auto splash = maybe_show_splash (); @@ -442,8 +442,12 @@ class App : public wxApp } _frame->Show (); - auto server = new JobServer (_frame); - new thread (boost::bind (&JobServer::run, server)); + try { + auto server = new JobServer (_frame); + new thread (boost::bind (&JobServer::run, server)); + } catch (boost::system::system_error& e) { + error_dialog(_frame, _("Could not listen for new batch jobs. Perhaps another instance of the DCP-o-matic Batch Converter is running.")); + } signal_manager = new wxSignalManager (this); this->Bind (wxEVT_IDLE, boost::bind (&App::idle, this)); @@ -488,9 +492,9 @@ class App : public wxApp return true; } - void config_failed_to_load () + void config_failed_to_load(Config::LoadFailure what) { - message_dialog (_frame, _("The existing configuration failed to load. Default values will be used instead. These may take a short time to create.")); + report_config_load_failure(_frame, what); } void config_warning (string m)