using boost::function;
static
-void
+bool
do_nothing ()
{
-
+ return false;
}
Page::Page (wxSize panel_size, int border)
int border,
function<void (shared_ptr<dcp::CertificateChain>)> set,
function<shared_ptr<const dcp::CertificateChain> (void)> get,
- function<void (void)> nag_remake
+ function<bool (void)> nag_remake
)
: wxDialog (parent, wxID_ANY, title)
, _set (set)
try {
extra = c.read_string (dcp::file_to_string (wx_to_std (d->GetPath ())));
} catch (boost::filesystem::filesystem_error& e) {
- error_dialog (this, wxString::Format (_("Could not import certificate (%s)"), d->GetPath().data()));
+ error_dialog (this, _("Could not import certificate (%s)"), d->GetPath());
d->Destroy ();
return;
}
update_certificate_list ();
}
} catch (dcp::MiscError& e) {
- error_dialog (this, wxString::Format (_("Could not read certificate file (%s)"), e.what ()));
+ error_dialog (this, _("Could not read certificate file."), std_to_wx(e.what()));
}
}
intermediate_common_name = i->subject_common_name ();
}
- _nag_remake ();
+ if (_nag_remake()) {
+ /* Cancel was clicked */
+ return;
+ }
MakeChainDialog* d = new MakeChainDialog (
this,
_set (chain);
update_private_key ();
} catch (dcp::MiscError& e) {
- error_dialog (this, wxString::Format (_("Could not read certificate file (%s)"), e.what ()));
+ error_dialog (this, _("Could not read certificate file."), std_to_wx(e.what()));
}
}
d->Destroy ();
}
-void
+bool
KeysPage::nag_remake_decryption_chain ()
{
- NagDialog::maybe_nag (
+ return NagDialog::maybe_nag (
_panel,
Config::NAG_REMAKE_DECRYPTION_CHAIN,
- _("If you continue with this operation you will no longer be able to use any DKDMs that you have created. Also, any KDMs that have been sent to you will become useless. Proceed with caution!")
+ _("If you continue with this operation you will no longer be able to use any DKDMs that you have created. Also, any KDMs that have been sent to you will become useless. Proceed with caution!"),
+ true
);
}