#include "lib/job_manager.h"
#include "lib/util.h"
#include "lib/version.h"
-#include "lib/warnings.h"
#include <dcp/locale_convert.h>
-DCPOMATIC_DISABLE_WARNINGS
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <wx/spinctrl.h>
#include <wx/splash.h>
#include <wx/progdlg.h>
#include <wx/filepicker.h>
#include <wx/sizer.h>
-DCPOMATIC_ENABLE_WARNINGS
+LIBDCP_ENABLE_WARNINGS
#include <boost/thread.hpp>
setup_osx_flags (s, left, flags);
#endif
auto m = create_label (p, t, left);
- s->Add (m, prop, flags, 6);
+ s->Add (m, prop, flags, DCPOMATIC_SIZER_GAP);
return m;
}
#ifdef __WXOSX__
setup_osx_flags (s, left, flags);
#endif
- s->Add (t, prop, flags, 6);
+ s->Add (t, prop, flags, DCPOMATIC_SIZER_GAP);
return t;
}
void
-checked_set (wxChoice* widget, vector<pair<string, string> > items)
+checked_set (wxChoice* widget, vector<pair<string, string>> items)
{
vector<pair<string, string>> current;
for (unsigned int i = 0; i < widget->GetCount(); ++i) {
wxSplashScreen* splash = nullptr;
try {
wxBitmap bitmap;
- if (bitmap.LoadFile(bitmap_path("splash"), wxBITMAP_TYPE_PNG)) {
+ if (bitmap.LoadFile(bitmap_path("splash.png"), wxBITMAP_TYPE_PNG)) {
{
/* This wxMemoryDC must be destroyed before bitmap can be used elsewhere */
wxMemoryDC dc(bitmap);
base = resources_path();
#endif
- auto p = base / String::compose("%1.png", name);
+ auto p = base / name;
return std_to_wx (p.string());
}
#endif
}
+
+void
+report_config_load_failure(wxWindow* parent, Config::LoadFailure what)
+{
+ switch (what) {
+ case Config::LoadFailure::CONFIG:
+ message_dialog(parent, _("The existing configuration failed to load. Default values will be used instead. These may take a short time to create."));
+ break;
+ case Config::LoadFailure::CINEMAS:
+ message_dialog(
+ parent,
+ _(wxString::Format("The cinemas list for creating KDMs (cinemas.xml) failed to load. Please check the numbered backup files in %s",
+ std_to_wx(Config::instance()->cinemas_file().parent_path().string())))
+ );
+ break;
+ case Config::LoadFailure::DKDM_RECIPIENTS:
+ message_dialog(
+ parent,
+ _(wxString::Format("The recipients list for creating DKDMs (dkdm_recipients.xml) failed to load. Please check the numbered backup files in %s",
+ std_to_wx(Config::instance()->dkdm_recipients_file().parent_path().string())))
+ );
+ break;
+ }
+}