#include <shellapi.h>
#endif
#include <boost/filesystem.hpp>
-#include <boost/noncopyable.hpp>
#include <boost/algorithm/string.hpp>
#include <iostream>
#include <fstream>
#endif
using dcp::raw_convert;
-class FilmChangedClosingDialog : public boost::noncopyable
+class FilmChangedClosingDialog
{
public:
explicit FilmChangedClosingDialog (string name)
_dialog->Destroy ();
}
+ FilmChangedClosingDialog (FilmChangedClosingDialog const&) = delete;
+ FilmChangedClosingDialog& operator= (FilmChangedClosingDialog const&) = delete;
+
int run ()
{
return _dialog->ShowModal ();
wxMessageDialog* _dialog;
};
-class FilmChangedDuplicatingDialog : public boost::noncopyable
+
+class FilmChangedDuplicatingDialog
{
public:
explicit FilmChangedDuplicatingDialog (string name)
_dialog->Destroy ();
}
+ FilmChangedDuplicatingDialog (FilmChangedDuplicatingDialog const&) = delete;
+ FilmChangedDuplicatingDialog& operator= (FilmChangedDuplicatingDialog const&) = delete;
+
int run ()
{
return _dialog->ShowModal ();
void film_change (ChangeType type)
{
- if (type == CHANGE_TYPE_DONE) {
+ if (type == ChangeType::DONE) {
set_menu_sensitivity ();
}
}
}
list<string> to = { "carl@dcpomatic.com" };
Emailer emailer (d->email(), to, "DCP-o-matic translations", body);
- emailer.send ("main.carlh.net", 2525, EMAIL_PROTOCOL_STARTTLS);
+ emailer.send ("main.carlh.net", 2525, EmailProtocol::STARTTLS);
}
d->Destroy ();
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."));
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 ())
)