#include "wx/update_dialog.h"
#include "wx/video_waveform_dialog.h"
#include "wx/wx_signal_manager.h"
#include "wx/update_dialog.h"
#include "wx/video_waveform_dialog.h"
#include "wx/wx_signal_manager.h"
nullptr,
wxString::Format(_("Save changes to film \"%s\" before closing?"), std_to_wx (name).data()),
/// TRANSLATORS: this is the heading for a dialog box, which tells the user that the current
/// project (Film) has been changed since it was last saved.
_("Film changed"),
wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_QUESTION
nullptr,
wxString::Format(_("Save changes to film \"%s\" before closing?"), std_to_wx (name).data()),
/// TRANSLATORS: this is the heading for a dialog box, which tells the user that the current
/// project (Film) has been changed since it was last saved.
_("Film changed"),
wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_QUESTION
nullptr,
wxString::Format(_("Save changes to film \"%s\" before duplicating?"), std_to_wx (name).data()),
/// TRANSLATORS: this is the heading for a dialog box, which tells the user that the current
/// project (Film) has been changed since it was last saved.
_("Film changed"),
wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_QUESTION
nullptr,
wxString::Format(_("Save changes to film \"%s\" before duplicating?"), std_to_wx (name).data()),
/// TRANSLATORS: this is the heading for a dialog box, which tells the user that the current
/// project (Film) has been changed since it was last saved.
_("Film changed"),
wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_QUESTION
- auto d = make_wx<FilmNameLocationDialog>(this, _("New Film"), true);
- int const r = d->ShowModal ();
+ FilmNameLocationDialog dialog(this, _("New Film"), true);
+ int const r = dialog.ShowModal();
this,
_("Select film to open"),
std_to_wx (Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()),
this,
_("Select film to open"),
std_to_wx (Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()),
- auto d = make_wx<SaveTemplateDialog>(this);
- if (d->ShowModal() == wxID_OK) {
- Config::instance()->save_template (_film, d->name ());
+ SaveTemplateDialog dialog(this);
+ if (dialog.ShowModal() == wxID_OK) {
+ Config::instance()->save_template(_film, dialog.name());
- if (d->ShowModal() == wxID_OK && d->check_path() && maybe_save_film<FilmChangedDuplicatingDialog>()) {
- shared_ptr<Film> film (new Film (d->path()));
+ if (dialog.ShowModal() == wxID_OK && dialog.check_path() && maybe_save_film<FilmChangedDuplicatingDialog>()) {
+ auto film = make_shared<Film>(dialog.path());
- if (d->ShowModal() == wxID_OK && d->check_path() && maybe_save_film<FilmChangedDuplicatingDialog>()) {
- auto film = make_shared<Film>(d->path());
+ if (dialog.ShowModal() == wxID_OK && dialog.check_path() && maybe_save_film<FilmChangedDuplicatingDialog>()) {
+ auto film = make_shared<Film>(dialog.path());
- auto d = make_wx<PasteDialog>(this, static_cast<bool>(_clipboard->video), static_cast<bool>(_clipboard->audio), !_clipboard->text.empty());
- if (d->ShowModal() != wxID_OK) {
+ PasteDialog dialog(this, static_cast<bool>(_clipboard->video), static_cast<bool>(_clipboard->audio), !_clipboard->text.empty());
+ if (dialog.ShowModal() != wxID_OK) {
auto j = i->text.begin ();
auto k = _clipboard->text.begin ();
while (j != i->text.end() && k != _clipboard->text.end()) {
auto j = i->text.begin ();
auto k = _clipboard->text.begin ();
while (j != i->text.end() && k != _clipboard->text.end()) {
nullptr,
_("Are you sure you want to restore preferences to their defaults? This cannot be undone."),
_("Restore default preferences"),
wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION
);
nullptr,
_("Are you sure you want to restore preferences to their defaults? This cannot be undone."),
_("Restore default preferences"),
wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION
);
this, _("Specify ZIP file"), wxEmptyString, wxT("dcpomatic_config.zip"), wxT("ZIP files (*.zip)|*.zip"),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT
);
this, _("Specify ZIP file"), wxEmptyString, wxT("dcpomatic_config.zip"), wxT("ZIP files (*.zip)|*.zip"),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT
);
- auto hints = make_wx<HintsDialog>(this, _film, false);
- if (hints->ShowModal() == wxID_CANCEL) {
+ HintsDialog hints(this, _film, false);
+ if (hints.ShowModal() == wxID_CANCEL) {
- auto hints = make_wx<HintsDialog>(this, _film, false);
- if (hints->ShowModal() == wxID_CANCEL) {
+ HintsDialog hints(this, _film, false);
+ if (hints.ShowModal() == wxID_CANCEL) {
- auto d = make_wx<SelfDKDMDialog>(this, _film);
- if (d->ShowModal () != wxID_OK) {
+ SelfDKDMDialog dialog(this, _film);
+ if (dialog.ShowModal() != wxID_OK) {
auto dkdms = Config::instance()->dkdms();
dkdms->add (make_shared<DKDM>(kdm.get()));
Config::instance()->changed ();
} else {
auto dkdms = Config::instance()->dkdms();
dkdms->add (make_shared<DKDM>(kdm.get()));
Config::instance()->changed ();
} else {
- auto d = make_wx<ExportVideoFileDialog>(this, _film->isdcf_name(true));
- if (d->ShowModal() != wxID_OK) {
+ ExportVideoFileDialog dialog(this, _film->isdcf_name(true));
+ if (dialog.ShowModal() != wxID_OK) {
auto job = make_shared<TranscodeJob>(_film, TranscodeJob::ChangedBehaviour::EXAMINE_THEN_STOP);
job->set_encoder (
make_shared<FFmpegEncoder> (
auto job = make_shared<TranscodeJob>(_film, TranscodeJob::ChangedBehaviour::EXAMINE_THEN_STOP);
job->set_encoder (
make_shared<FFmpegEncoder> (
- _film, job, d->path(), d->format(), d->mixdown_to_stereo(), d->split_reels(), d->split_streams(), d->x264_crf())
+ _film, job, dialog.path(), dialog.format(), dialog.mixdown_to_stereo(), dialog.split_reels(), dialog.split_streams(), dialog.x264_crf())
- auto d = make_wx<ExportSubtitlesDialog>(this, _film->reels().size(), _film->interop());
- if (d->ShowModal() != wxID_OK) {
+ ExportSubtitlesDialog dialog(this, _film->reels().size(), _film->interop());
+ if (dialog.ShowModal() != wxID_OK) {
- make_shared<SubtitleEncoder>(_film, job, d->path(), _film->isdcf_name(true), d->split_reels(), d->include_font())
+ make_shared<SubtitleEncoder>(_film, job, dialog.path(), _film->isdcf_name(true), dialog.split_reels(), dialog.include_font())
body += string(dcpomatic_version) + " " + string(dcpomatic_git_commit) + "\n";
body += "--\n";
auto translations = I18NHook::translations ();
body += string(dcpomatic_version) + " " + string(dcpomatic_git_commit) + "\n";
body += "--\n";
auto translations = I18NHook::translations ();
error_dialog (this, _("You must enter a valid email address when sending translations, "
"otherwise the DCP-o-matic maintainers cannot credit you or contact you with questions."));
} else {
error_dialog (this, _("You must enter a valid email address when sending translations, "
"otherwise the DCP-o-matic maintainers cannot credit you or contact you with questions."));
} else {
- Emailer emailer (d->email(), to, "DCP-o-matic translations", body);
+ Emailer emailer(dialog.email(), to, "DCP-o-matic translations", body);
try {
emailer.send ("main.carlh.net", 2525, EmailProtocol::STARTTLS);
} catch (NetworkError& e) {
try {
emailer.send ("main.carlh.net", 2525, EmailProtocol::STARTTLS);
} catch (NetworkError& e) {
- auto d = make_wx<ReportProblemDialog>(this, _film);
- if (d->ShowModal () == wxID_OK) {
- d->report ();
+ ReportProblemDialog dialog(this, _film);
+ if (dialog.ShowModal() == wxID_OK) {
+ dialog.report();
nullptr,
_("There are unfinished jobs; are you sure you want to quit?"),
_("Unfinished jobs"),
wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION
);
nullptr,
_("There are unfinished jobs; are you sure you want to quit?"),
_("Unfinished jobs"),
wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION
);
} else if (uc->state() == UpdateChecker::State::FAILED) {
error_dialog (this, _("The DCP-o-matic download server could not be contacted."));
} else {
} else if (uc->state() == UpdateChecker::State::FAILED) {
error_dialog (this, _("The DCP-o-matic download server could not be contacted."));
} else {
- auto notes = make_wx<HTMLDialog>(nullptr, _("Release notes"), std_to_wx(*release_notes), true);
- notes->Centre();
- notes->ShowModal();
+ HTMLDialog notes(nullptr, _("Release notes"), std_to_wx(*release_notes), true);
+ notes.Centre();
+ notes.ShowModal();
_frame, _("Recreate signing certificates"),
_("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs contains a small error\n"
"which will prevent DCPs from being validated correctly on some systems. Do you want to re-create\n"
_frame, _("Recreate signing certificates"),
_("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs contains a small error\n"
"which will prevent DCPs from being validated correctly on some systems. Do you want to re-create\n"
}
case Config::BAD_SIGNER_VALIDITY_TOO_LONG:
{
if (config->nagged(Config::NAG_BAD_SIGNER_CHAIN_VALIDITY)) {
return false;
}
}
case Config::BAD_SIGNER_VALIDITY_TOO_LONG:
{
if (config->nagged(Config::NAG_BAD_SIGNER_CHAIN_VALIDITY)) {
return false;
}
_frame, _("Recreate signing certificates"),
_("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs has a validity period\n"
"that is too long. This will cause problems playing back DCPs on some systems.\n"
_frame, _("Recreate signing certificates"),
_("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs has a validity period\n"
"that is too long. This will cause problems playing back DCPs on some systems.\n"
_frame, _("Recreate signing certificates"),
_("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs is inconsistent and\n"
"cannot be used. DCP-o-matic cannot start unless you re-create it. Do you want to re-create\n"
"the certificate chain for signing DCPs and KDMs?"),
_("Close DCP-o-matic")
);
_frame, _("Recreate signing certificates"),
_("The certificate chain that DCP-o-matic uses for signing DCPs and KDMs is inconsistent and\n"
"cannot be used. DCP-o-matic cannot start unless you re-create it. Do you want to re-create\n"
"the certificate chain for signing DCPs and KDMs?"),
_("Close DCP-o-matic")
);
_frame, _("Recreate KDM decryption chain"),
_("The certificate chain that DCP-o-matic uses for decrypting KDMs is inconsistent and\n"
"cannot be used. DCP-o-matic cannot start unless you re-create it. Do you want to re-create\n"
_frame, _("Recreate KDM decryption chain"),
_("The certificate chain that DCP-o-matic uses for decrypting KDMs is inconsistent and\n"
"cannot be used. DCP-o-matic cannot start unless you re-create it. Do you want to re-create\n"