2 Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
21 #include "disk_warning_dialog.h"
22 #include "static_text.h"
25 DiskWarningDialog::DiskWarningDialog ()
26 : wxDialog(nullptr, wxID_ANY, _("Important notice"))
28 auto sizer = new wxBoxSizer (wxVERTICAL);
29 auto text = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize(400, 300));
30 sizer->Add (text, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
31 _yes = new wxTextCtrl (this, wxID_ANY);
32 sizer->Add (_yes, 0, wxALL, DCPOMATIC_DIALOG_BORDER);
34 auto buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL);
36 sizer->Add(buttons, wxSizerFlags().Expand().DoubleBorder());
41 sizer->SetSizeHints (this);
43 /// TRANSLATORS: the user will be asked to type this phrase into a text entry to confirm that they have read
44 /// the warning about using the disk writer.
45 auto const confirmation = _("I am sure");
47 text->SetLabelMarkup(wxString::Format(
48 _("The <b>DCP-o-matic Disk Writer</b> is\n\n<span weight=\"bold\" size=\"20480\" foreground=\"red\">BETA-GRADE TEST SOFTWARE</span>\n\n"
49 "and may\n\n<span weight=\"bold\" size=\"20480\" foreground=\"red\">DESTROY DATA!</span>\n\n"
50 "If you are sure you want to continue please type\n\n<tt>%s</tt>\n\ninto the box below, then click OK."),
55 DiskWarningDialog::confirmed () const
57 return _yes->GetValue() == _("I am sure");