X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic.cc;h=f8ee17bce355343064db1fd752774b72e9f72b37;hb=998ebab3fafd238a49d4ececeecb4bbf9f17b699;hp=a670af7dbb7b87396aaca76f9b69e32b3409524d;hpb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;p=dcpomatic.git diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index a670af7db..f8ee17bce 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -102,7 +102,6 @@ DCPOMATIC_ENABLE_WARNINGS #include #endif #include -#include #include #include #include @@ -135,7 +134,7 @@ using namespace boost::placeholders; #endif using dcp::raw_convert; -class FilmChangedClosingDialog : public boost::noncopyable +class FilmChangedClosingDialog { public: explicit FilmChangedClosingDialog (string name) @@ -159,6 +158,9 @@ public: _dialog->Destroy (); } + FilmChangedClosingDialog (FilmChangedClosingDialog const&) = delete; + FilmChangedClosingDialog& operator= (FilmChangedClosingDialog const&) = delete; + int run () { return _dialog->ShowModal (); @@ -168,7 +170,8 @@ private: wxMessageDialog* _dialog; }; -class FilmChangedDuplicatingDialog : public boost::noncopyable + +class FilmChangedDuplicatingDialog { public: explicit FilmChangedDuplicatingDialog (string name) @@ -192,6 +195,9 @@ public: _dialog->Destroy (); } + FilmChangedDuplicatingDialog (FilmChangedDuplicatingDialog const&) = delete; + FilmChangedDuplicatingDialog& operator= (FilmChangedDuplicatingDialog const&) = delete; + int run () { return _dialog->ShowModal (); @@ -1462,11 +1468,11 @@ private: return; } - if (uc->state() == UpdateChecker::YES) { + if (uc->state() == UpdateChecker::State::YES) { auto dialog = new UpdateDialog (this, uc->stable(), uc->test()); dialog->ShowModal (); dialog->Destroy (); - } else if (uc->state() == UpdateChecker::FAILED) { + } else if (uc->state() == UpdateChecker::State::FAILED) { error_dialog (this, _("The DCP-o-matic download server could not be contacted.")); } else { error_dialog (this, _("There are no new versions of DCP-o-matic available.")); @@ -1710,17 +1716,27 @@ private: throw; } catch (FileError& e) { error_dialog ( - 0, - wxString::Format ( + nullptr, + wxString::Format( _("An exception occurred: %s (%s)\n\n") + REPORT_PROBLEM, std_to_wx (e.what()), - std_to_wx (e.file().string().c_str ()) + std_to_wx (e.file().string().c_str()) + ) + ); + } catch (boost::filesystem::filesystem_error& e) { + error_dialog ( + nullptr, + wxString::Format( + _("An exception occurred: %s (%s) (%s)\n\n") + REPORT_PROBLEM, + std_to_wx (e.what()), + std_to_wx (e.path1().string()), + std_to_wx (e.path2().string()) ) ); } catch (exception& e) { error_dialog ( nullptr, - wxString::Format ( + wxString::Format( _("An exception occurred: %s.\n\n") + REPORT_PROBLEM, std_to_wx (e.what ()) ) @@ -1768,14 +1784,12 @@ private: void config_failed_to_load () { - close_splash (); 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) { - close_splash (); - message_dialog (_frame, std_to_wx (m)); + message_dialog (_frame, std_to_wx(m)); } bool config_bad (Config::BadReason reason)