Tidy up code to report failures to load config in the UI.
[dcpomatic.git] / src / tools / dcpomatic_server.cc
index fe70ec6f716dade9aaa3f19b4cce98baea2101e6..e5e3a7e5a072e6a5838f8ff40e149cd49e3bae51 100644 (file)
@@ -287,7 +287,7 @@ private:
                server_log->set_types (LogEntry::TYPE_GENERAL | LogEntry::TYPE_WARNING | LogEntry::TYPE_ERROR);
                dcpomatic_log = server_log;
 
-               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 ();
@@ -361,9 +361,9 @@ private:
                signal_manager->ui_idle ();
        }
 
-       void config_failed_to_load ()
+       void config_failed_to_load(Config::LoadFailure what)
        {
-               message_dialog (nullptr, _("The existing configuration failed to load.  Default values will be used instead.  These may take a short time to create."));
+               report_config_load_failure(nullptr, what);
        }
 
        void config_warning (string m)