2 Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <wx/notebook.h>
21 #include <wx/hyperlink.h>
22 #include "lib/version.h"
23 #include "lib/compose.hpp"
24 #include "about_dialog.h"
29 AboutDialog::AboutDialog (wxWindow* parent)
30 : wxDialog (parent, wxID_ANY, _("About DCP-o-matic"))
32 wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
33 wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
35 wxFont title_font (*wxNORMAL_FONT);
36 title_font.SetPointSize (title_font.GetPointSize() + 12);
37 title_font.SetWeight (wxFONTWEIGHT_BOLD);
39 wxFont subtitle_font (*wxNORMAL_FONT);
40 subtitle_font.SetPointSize (subtitle_font.GetPointSize() + 2);
42 wxFont version_font (*wxNORMAL_FONT);
43 version_font.SetWeight (wxFONTWEIGHT_BOLD);
45 wxStaticText* t = new wxStaticText (this, wxID_ANY, _("DCP-o-matic"));
46 t->SetFont (title_font);
47 sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 16));
50 if (strcmp (dcpomatic_git_commit, "release") == 0) {
51 t = new wxStaticText (this, wxID_ANY, std_to_wx (String::compose ("Version %1", dcpomatic_version)));
53 t = new wxStaticText (this, wxID_ANY, std_to_wx (String::compose ("Version %1 git %2", dcpomatic_version, dcpomatic_git_commit)));
55 t->SetFont (version_font);
56 sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 2));
57 sizer->AddSpacer (12);
59 t = new wxStaticText (
61 _("Free, open-source DCP generation from almost anything."),
62 wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
64 t->SetFont (subtitle_font);
66 sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 8));
68 wxHyperlinkCtrl* h = new wxHyperlinkCtrl (
70 wxT ("dcpomatic.com"),
71 wxT ("http://dcpomatic.com")
74 sizer->Add (h, wxSizerFlags().Centre().Border(wxALL, 8));
76 t = new wxStaticText (
78 _("(C) 2012-2014 Carl Hetherington, Terrence Meiczinger, Paul Davis, Ole Laursen"),
79 wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
82 sizer->Add (t, wxSizerFlags().Centre().Border(wxLEFT | wxRIGHT, 16));
84 _notebook = new wxNotebook (this, wxID_ANY);
86 wxArrayString written_by;
87 written_by.Add (wxT ("Carl Hetherington"));
88 written_by.Add (wxT ("Terrence Meiczinger"));
89 written_by.Add (wxT ("Paul Davis"));
90 written_by.Add (wxT ("Ole Laursen"));
91 add_section (_("Written by"), written_by);
93 wxArrayString translated_by;
94 translated_by.Add (wxT ("Olivier Perriere"));
95 translated_by.Add (wxT ("Lilian Lefranc"));
96 translated_by.Add (wxT ("Thierry Journet"));
97 translated_by.Add (wxT ("Massimiliano Broggi"));
98 translated_by.Add (wxT ("William Fanelli"));
99 translated_by.Add (wxT ("Manuel AC"));
100 translated_by.Add (wxT ("Adam Klotblixt"));
101 translated_by.Add (wxT ("Markus Raab"));
102 add_section (_("Translated by"), translated_by);
104 wxArrayString supported_by;
105 supported_by.Add (wxT ("Carsten Kurz"));
106 supported_by.Add (wxT ("Wolfgang Woehl"));
107 supported_by.Add (wxT ("Manual AC"));
108 supported_by.Add (wxT ("Theo Lipfert"));
109 supported_by.Add (wxT ("Olivier Lemaire"));
110 supported_by.Add (wxT ("Mattias Mattsson"));
111 supported_by.Add (wxT ("Andrä Steiner"));
112 supported_by.Add (wxT ("Jonathan Jensen"));
113 supported_by.Add (wxT ("Mike Stiebing"));
114 supported_by.Add (wxT ("Kjarten Michaelsen"));
115 supported_by.Add (wxT ("Jussi Siponen"));
116 supported_by.Add (wxT ("Cinema Clarici"));
117 supported_by.Add (wxT ("Evan Freeze"));
118 supported_by.Add (wxT ("Flor Guillaume"));
119 supported_by.Add (wxT ("Adam Klotblixt "));
120 supported_by.Add (wxT ("Lilian Lefranc"));
121 supported_by.Add (wxT ("Gavin Lewarne"));
122 supported_by.Add (wxT ("Lasse Salling"));
123 supported_by.Add (wxT ("Andres Fink"));
124 supported_by.Add (wxT ("Kieran Carroll"));
125 supported_by.Add (wxT ("Kambiz Afshar"));
126 supported_by.Add (wxT ("Sean Leigh"));
127 supported_by.Add (wxT ("Wolfram Weber"));
128 supported_by.Add (wxT ("Randy Stankey"));
129 supported_by.Add (wxT ("Frank Cianciolo"));
130 supported_by.Add (wxT ("Rodolfo Giuliano"));
131 supported_by.Add (wxT ("Sylvain Mielle"));
132 supported_by.Add (wxT ("Ivan Pullman"));
133 supported_by.Add (wxT ("Aldo Midali"));
134 supported_by.Add (wxT ("Jeff Boot"));
135 supported_by.Add (wxT ("Filip Kovcin"));
136 supported_by.Add (wxT ("Adam Colt"));
137 add_section (_("Supported by"), supported_by);
139 wxArrayString testers;
140 testers.Add (wxT ("Greg Rooke"));
141 testers.Add (wxT ("Olivier Lemaire"));
142 testers.Add (wxT ("Trever Anderson"));
143 testers.Add (wxT ("Wolfgang Woehl"));
144 testers.Add (wxT ("Jonathan Jensen"));
145 testers.Add (wxT ("Anders Nordentoft-Madsen"));
146 testers.Add (wxT ("Lilian Lefranc"));
147 testers.Add (wxT ("Gérald Maruccia"));
148 testers.Add (wxT ("John Convertino"));
149 testers.Add (wxT ("Mike Blakesley"));
150 testers.Add (wxT ("Simon Kesselman"));
151 testers.Add (wxT ("Gavin Lewarne"));
152 testers.Add (wxT ("Thierry Journet"));
153 testers.Add (wxT ("Carsten Kurz"));
154 testers.Add (wxT ("Karim Senoucci"));
155 testers.Add (wxT ("Paul Willmott"));
156 testers.Add (wxT ("Mattias Mattsson"));
157 testers.Add (wxT ("Andreas Eli"));
158 testers.Add (wxT ("Roop Chand"));
159 testers.Add (wxT ("Peter Puchner"));
160 testers.Add (wxT ("David Booty"));
161 testers.Add (wxT ("Maurizio Giampà"));
162 testers.Add (wxT ("Bill Lam"));
163 testers.Add (wxT ("Pepijn Klijs"));
164 testers.Add (wxT ("Will Meadows"));
165 testers.Add (wxT ("Adam Colt"));
166 add_section (_("Tested by"), testers);
168 sizer->Add (_notebook, wxSizerFlags().Centre().Border(wxALL, 16).Expand());
170 overall_sizer->Add (sizer);
172 wxSizer* buttons = CreateButtonSizer (wxOK);
174 overall_sizer->Add (buttons, 1, wxEXPAND | wxALL, 4);
177 SetSizerAndFit (overall_sizer);
181 AboutDialog::add_section (wxString name, wxArrayString credits)
183 static bool first = true;
186 wxPanel* panel = new wxPanel (_notebook, wxID_ANY);
187 wxSizer* overall_sizer = new wxBoxSizer (wxHORIZONTAL);
189 vector<wxSizer*> sizers;
191 for (int i = 0; i < N; ++i) {
192 sizers.push_back (new wxBoxSizer (wxVERTICAL));
193 overall_sizer->Add (sizers.back (), 1, wxEXPAND | wxALL, 6);
197 for (size_t i = 0; i < credits.Count(); ++i) {
198 add_label_to_sizer (sizers[c], panel, credits[i], false);
205 panel->SetSizerAndFit (overall_sizer);
206 _notebook->AddPage (panel, name, first);