X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fconfig_dialog.cc;h=c5879d3bbd3d31da6af802ffa631b484b436218b;hb=9bda3fda70912d73266a2dbac5470ca23d2ff6fd;hp=576e979e9f8fd4bef6f7474588aebded8fa948d4;hpb=b43fa17ece8aacb7cbe85d62f055a50a6858ce0d;p=dcpomatic.git diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 576e979e9..c5879d3bb 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -36,7 +36,7 @@ using std::make_shared; using boost::bind; using boost::optional; using std::shared_ptr; -using boost::function; +using std::function; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif @@ -132,7 +132,7 @@ GeneralPage::add_language_controls (wxGridBagSizer* table, int& r) languages.push_back (make_pair("Português do Brasil", "pt_BR")); languages.push_back (make_pair("Svenska", "sv_SE")); languages.push_back (make_pair("Slovenský jazyk", "sk_SK")); - languages.push_back (make_pair("Türkçe", "tr_TR")); + // languages.push_back (make_pair("Türkçe", "tr_TR")); languages.push_back (make_pair("українська мова", "uk_UA")); checked_set (_language, languages); table->Add (_language, wxGBPosition (r, 1)); @@ -477,7 +477,7 @@ void CertificateChainEditor::export_chain () { auto d = new wxFileDialog ( - this, _("Select Chain File"), wxEmptyString, _("certificate_chain.pem"), wxT("PEM files (*.pem)|*.pem"), + this, _("Select Chain File"), wxEmptyString, wxT("certificate_chain.pem"), wxT("PEM files (*.pem)|*.pem"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); @@ -583,6 +583,7 @@ CertificateChainEditor::remake_certificates () _set ( make_shared ( openssl_path (), + CERTIFICATE_VALIDITY_PERIOD, d->organisation (), d->organisational_unit (), d->root_common_name (), @@ -633,7 +634,7 @@ CertificateChainEditor::import_private_key () chain->set_key (dcp::file_to_string (p)); _set (chain); update_private_key (); - } catch (dcp::MiscError& e) { + } catch (std::exception& e) { error_dialog (this, _("Could not read certificate file."), std_to_wx(e.what())); } } @@ -652,7 +653,7 @@ CertificateChainEditor::export_private_key () } auto d = new wxFileDialog ( - this, _("Select Key File"), wxEmptyString, _("private_key.pem"), wxT ("PEM files (*.pem)|*.pem"), + this, _("Select Key File"), wxEmptyString, wxT("private_key.pem"), wxT("PEM files (*.pem)|*.pem"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); @@ -690,7 +691,7 @@ KeysPage::setup () { auto m = new StaticText (_panel, _("Decrypting KDMs")); m->SetFont (subheading_font); - sizer->Add (m, 0, wxALL, _border); + sizer->Add (m, 0, wxALL | wxEXPAND, _border); } auto buttons = new wxBoxSizer (wxVERTICAL); @@ -714,7 +715,7 @@ KeysPage::setup () { auto m = new StaticText (_panel, _("Signing DCPs and KDMs")); m->SetFont (subheading_font); - sizer->Add (m, 0, wxALL, _border); + sizer->Add (m, 0, wxALL | wxEXPAND, _border); } auto signing_advanced = new Button (_panel, _("Advanced...")); @@ -846,8 +847,7 @@ KeysPage::export_decryption_certificate () if (!config->dcp_issuer().empty()) { default_name += "_" + std_to_wx(careful_string_filter(config->dcp_issuer())); } - /// TRANSLATORS: this is the suffix of the defautl filename used when exporting KDM decryption leaf certificates - default_name += _("_kdm_decryption_cert.pem"); + default_name += wxT("_kdm_decryption_cert.pem"); auto d = new wxFileDialog ( _panel, _("Select Certificate File"), wxEmptyString, default_name, wxT("PEM files (*.pem)|*.pem"), @@ -898,7 +898,7 @@ SoundPage::setup () add_label_to_sizer (table, _panel, _("Mapping"), true, wxGBPosition(r, 0)); _map = new AudioMappingView (_panel, _("DCP"), _("DCP"), _("Output"), _("output")); - _map->SetSize (-1, 600); + _map->SetSize (-1, 400); table->Add (_map, wxGBPosition(r, 1), wxDefaultSpan, wxEXPAND); ++r; @@ -1082,7 +1082,7 @@ LocationsPage::GetName () const wxBitmap LocationsPage::GetLargeIcon () const { - return wxBitmap ("locations", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("locations"), wxBITMAP_TYPE_PNG); } #endif