Remove unused setup stuff in DownloadCertificatePanel.
authorCarl Hetherington <cth@carlh.net>
Tue, 14 Aug 2018 22:46:05 +0000 (23:46 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 15 Aug 2018 09:57:06 +0000 (10:57 +0100)
src/wx/download_certificate_dialog.cc
src/wx/download_certificate_dialog.h
src/wx/download_certificate_panel.h

index b4d6020928473c2fafbaca6cf523ebfc157a8aa8..bccfbb5c24067b9434f74da3926a30b54a676b8c 100644 (file)
@@ -33,7 +33,6 @@ DownloadCertificateDialog::DownloadCertificateDialog (wxWindow* parent)
        sizer->Add (_notebook, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
 
        _pages.push_back (new DolbyDoremiCertificatePanel (_notebook, this));
-       _setup.push_back (false);
 
        BOOST_FOREACH (DownloadCertificatePanel* i, _pages) {
                _notebook->AddPage (i, i->name(), true);
@@ -92,17 +91,10 @@ DownloadCertificateDialog::setup_sensitivity ()
        if (ok) {
                ok->Enable (static_cast<bool>(p->certificate ()));
        }
-
 }
 
 void
 DownloadCertificateDialog::page_changed (wxNotebookEvent &)
 {
-       int const n = _notebook->GetSelection();
-       if (!_setup[n]) {
-               _pages[n]->setup ();
-               _setup[n] = true;
-       }
-
        setup_sensitivity ();
 }
index dcb0a952ae1f014e63afad3d67d982b9e55493ad..0df504975e6f904d0193cced64644203c703dbea 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.
 
@@ -39,7 +39,6 @@ private:
 
        wxNotebook* _notebook;
        std::vector<DownloadCertificatePanel*> _pages;
-       std::vector<bool> _setup;
        wxButton* _download;
        wxStaticText* _message;
 };
index 258d5ab25372c5a6cdc724797b82596334f27be8..98e48de39a105f9fe854372d5ddfab1d5edefe00 100644 (file)
@@ -32,8 +32,6 @@ class DownloadCertificatePanel : public wxPanel
 public:
        DownloadCertificatePanel (wxWindow* parent, DownloadCertificateDialog* dialog);
 
-       /* Do any setup that may take a noticeable amount of time */
-       virtual void setup () {}
        virtual bool ready_to_download () const = 0;
        virtual void do_download (wxStaticText* message) = 0;
        virtual wxString name () const = 0;