Add hint when making a FTR without FFEC/FFMC markers (#1804).
[dcpomatic.git] / src / wx / initial_setup_dialog.cc
1 /*
2     Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
3
4     This file is part of DCP-o-matic.
5
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.
10
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.
15
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/>.
18
19 */
20
21 #include "initial_setup_dialog.h"
22 #include "static_text.h"
23 #include "lib/config.h"
24 #include <boost/bind.hpp>
25
26 InitialSetupDialog::InitialSetupDialog ()
27         : wxDialog (0, wxID_ANY, _("DCP-o-matic setup"))
28 {
29         wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
30         wxStaticText* text1 = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize(600, -1));
31         sizer->Add (text1, 1, wxEXPAND | wxALL, 12);
32
33         text1->SetLabelMarkup (
34                 _(
35                         "<span weight=\"bold\" size=\"larger\">Welcome to DCP-o-matic!</span>\n\n"
36                         "DCP-o-matic can work in two modes: '<i>simple</i>' or '<i>full</i>'.\n\n"
37                         "<i>Simple mode</i> is ideal for producing straightforward DCPs without too many confusing "
38                         "options.\n\n"
39                         "<i>Full mode</i> gives you the most control over the DCPs you make.\n\n"
40                         "Please choose which mode you would like to start DCP-o-matic in:"
41                         )
42                 );
43
44         wxBoxSizer* mode_sizer = new wxBoxSizer (wxVERTICAL);
45
46         _simple = new wxRadioButton (this, wxID_ANY, _("Simple mode"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
47         mode_sizer->Add (_simple, 0, wxTOP, 12);
48         _full = new wxRadioButton (this, wxID_ANY, _("Full mode"));
49         mode_sizer->Add (_full, 0, wxTOP, 8);
50
51         sizer->Add (mode_sizer, 0, wxLEFT, 24);
52
53         if (Config::instance()->interface_complexity() == Config::INTERFACE_SIMPLE) {
54                 _simple->SetValue (true);
55         } else {
56                 _full->SetValue (true);
57         }
58
59         wxStaticText* text2 = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize(400, -1));
60         sizer->Add (text2, 0, wxEXPAND | wxALL, 12);
61
62         text2->SetLabel (_("\nYou can change the mode at any time from the General page of Preferences."));
63
64         _simple->Bind (wxEVT_RADIOBUTTON, boost::bind(&InitialSetupDialog::interface_complexity_changed, this));
65         _full->Bind (wxEVT_RADIOBUTTON, boost::bind(&InitialSetupDialog::interface_complexity_changed, this));
66
67         wxSizer* buttons = CreateSeparatedButtonSizer (wxOK);
68         if (buttons) {
69                 sizer->Add(buttons, wxSizerFlags().Expand().DoubleBorder());
70         }
71
72         sizer->Layout ();
73         SetSizerAndFit (sizer);
74 }
75
76 void
77 InitialSetupDialog::interface_complexity_changed ()
78 {
79         if (_simple->GetValue()) {
80                 Config::instance()->set_interface_complexity (Config::INTERFACE_SIMPLE);
81         } else {
82                 Config::instance()->set_interface_complexity (Config::INTERFACE_FULL);
83         }
84 }