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 "lib/version.h"
22 #include "lib/compose.hpp"
23 #include "about_dialog.h"
28 AboutDialog::AboutDialog (wxWindow* parent)
29 : wxDialog (parent, wxID_ANY, _("About DVD-o-matic"))
31 wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
33 wxFont title_font (*wxNORMAL_FONT);
34 title_font.SetPointSize (title_font.GetPointSize() + 4);
35 title_font.SetWeight (wxFONTWEIGHT_BOLD);
37 wxFont version_font (*wxNORMAL_FONT);
38 version_font.SetWeight (wxFONTWEIGHT_BOLD);
40 wxStaticText* t = new wxStaticText (this, wxID_ANY, _("DVD-o-matic"));
41 t->SetFont (title_font);
42 sizer->Add (t, wxSizerFlags().Centre().Border());
45 if (strcmp (dvdomatic_git_commit, "release") == 0) {
46 t = new wxStaticText (this, wxID_ANY, std_to_wx (String::compose ("Version %1", dvdomatic_version)));
48 t = new wxStaticText (this, wxID_ANY, std_to_wx (String::compose ("Version %1 git %2", dvdomatic_version, dvdomatic_git_commit)));
50 t->SetFont (version_font);
51 sizer->Add (t, wxSizerFlags().Centre().Border());
52 sizer->AddSpacer (12);
54 t = new wxStaticText (
56 _("Free, open-source DCP generation from almost anything."),
57 wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
60 sizer->Add (t, wxSizerFlags().Centre().Border());
62 t = new wxStaticText (
64 _("(C) 2012-2013 Carl Hetherington, Terrence Meiczinger, Paul Davis, Ole Laursen"),
65 wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
68 sizer->Add (t, wxSizerFlags().Centre().Border());
70 _notebook = new wxNotebook (this, wxID_ANY);
72 wxArrayString written_by;
73 written_by.Add (wxT ("Carl Hetherington"));
74 written_by.Add (wxT ("Terrence Meiczinger"));
75 written_by.Add (wxT ("Paul Davis"));
76 written_by.Add (wxT ("Ole Laursen"));
77 add_section (_("Written by"), written_by);
79 wxArrayString translated_by;
80 translated_by.Add (wxT ("Olivier Perriere"));
81 translated_by.Add (wxT ("Lilian Lefranc"));
82 translated_by.Add (wxT ("Thierry Journet"));
83 translated_by.Add (wxT ("Massimiliano Broggi"));
84 translated_by.Add (wxT ("Manuel AC"));
85 translated_by.Add (wxT ("Adam Klotblixt"));
86 add_section (_("Translated by"), translated_by);
88 wxArrayString supported_by;
89 supported_by.Add (wxT ("Carsten Kurz"));
90 supported_by.Add (wxT ("Wolfgang Woehl"));
91 supported_by.Add (wxT ("Manual AC"));
92 supported_by.Add (wxT ("Theo Lipfert"));
93 supported_by.Add (wxT ("Olivier Lemaire"));
94 supported_by.Add (wxT ("Andrä Steiner"));
95 supported_by.Add (wxT ("Jonathan Jensen"));
96 supported_by.Add (wxT ("Kjarten Michaelsen"));
97 supported_by.Add (wxT ("Jussi Siponen"));
98 supported_by.Add (wxT ("Cinema Clarici"));
99 supported_by.Add (wxT ("Evan Freeze"));
100 supported_by.Add (wxT ("Flor Guillaume"));
101 supported_by.Add (wxT ("Adam Klotblixt "));
102 supported_by.Add (wxT ("Lilian Lefranc"));
103 supported_by.Add (wxT ("Gavin Lewarne"));
104 supported_by.Add (wxT ("Lasse Salling"));
105 supported_by.Add (wxT ("Andres Fink"));
106 supported_by.Add (wxT ("Kieran Carroll"));
107 add_section (_("Supported by"), supported_by);
109 sizer->Add (_notebook, wxSizerFlags().Centre().Border().Expand());
112 info.SetWebSite (wxT ("http://carlh.net/software/dvdomatic"));
115 SetSizerAndFit (sizer);
119 AboutDialog::add_section (wxString name, wxArrayString credits)
121 static bool first = true;
124 wxPanel* panel = new wxPanel (_notebook, wxID_ANY);
125 wxSizer* overall_sizer = new wxBoxSizer (wxHORIZONTAL);
127 vector<wxSizer*> sizers;
129 for (int i = 0; i < N; ++i) {
130 sizers.push_back (new wxBoxSizer (wxVERTICAL));
131 overall_sizer->Add (sizers.back (), 1, wxEXPAND | wxALL, 6);
135 for (size_t i = 0; i < credits.Count(); ++i) {
136 add_label_to_sizer (sizers[c], panel, credits[i]);
143 panel->SetSizerAndFit (overall_sizer);
144 _notebook->AddPage (panel, name, first);