Basics of in-place i18n with support for wxStaticText and wxCheckBox.
[dcpomatic.git] / src / wx / download_certificate_dialog.cc
index a2219cd6fec7a865d182d3a003a349a70130fae6..21a675ac70c0b74ae7d886d4e9c2a2d7ccd86470 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 */
 
 #include "dolby_doremi_certificate_panel.h"
+#include "barco_alchemy_certificate_panel.h"
+#include "christie_certificate_panel.h"
+#include "gdc_certificate_panel.h"
 #include "download_certificate_dialog.h"
+#include "static_text.h"
 #include "wx_util.h"
 
 using boost::optional;
@@ -35,14 +39,17 @@ DownloadCertificateDialog::DownloadCertificateDialog (wxWindow* parent)
        _download = new wxButton (this, wxID_ANY, _("Download"));
        sizer->Add (_download, 0, wxEXPAND | wxALL, DCPOMATIC_SIZER_GAP);
 
-       _message = new wxStaticText (this, wxID_ANY, wxT (""));
+       _message = new StaticText (this, wxT (""));
        sizer->Add (_message, 0, wxALL, DCPOMATIC_SIZER_GAP);
        wxFont font = _message->GetFont();
        font.SetStyle (wxFONTSTYLE_ITALIC);
        font.SetPointSize (font.GetPointSize() - 1);
        _message->SetFont (font);
 
-       _pages.push_back (new DolbyDoremiCertificatePanel (_notebook, _message, this));
+       _pages.push_back (new DolbyDoremiCertificatePanel (this));
+       _pages.push_back (new BarcoAlchemyCertificatePanel (this));
+       _pages.push_back (new ChristieCertificatePanel (this));
+       _pages.push_back (new GDCCertificatePanel (this));
 
        BOOST_FOREACH (DownloadCertificatePanel* i, _pages) {
                _notebook->AddPage (i, i->name(), true);
@@ -59,8 +66,9 @@ DownloadCertificateDialog::DownloadCertificateDialog (wxWindow* parent)
        _download->Bind (wxEVT_BUTTON, boost::bind (&DownloadCertificateDialog::download, this));
        _download->Enable (false);
 
-       wxNotebookEvent ev;
-       page_changed (ev);
+       _notebook->SetSelection (0);
+
+       setup_sensitivity ();
 }
 
 DownloadCertificateDialog::~DownloadCertificateDialog ()