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);
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 ();
}
/*
- 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.
wxNotebook* _notebook;
std::vector<DownloadCertificatePanel*> _pages;
- std::vector<bool> _setup;
wxButton* _download;
wxStaticText* _message;
};
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;