Extract all uses of DCP-o-matic name to allow branding.
[dcpomatic.git] / src / wx / about_dialog.cc
index 38cb466f1b2afd65a1f13fb752fec0232297acfa..28bee89b93b8c837837d560d44cc624106570292 100644 (file)
@@ -26,6 +26,7 @@
 #include "about_dialog.h"
 #include "static_text.h"
 #include "wx_util.h"
+#include "wx_variant.h"
 #include "lib/compose.hpp"
 #include "lib/version.h"
 #include <dcp/warnings.h>
@@ -38,7 +39,7 @@ using std::vector;
 
 
 AboutDialog::AboutDialog (wxWindow* parent)
-       : wxDialog (parent, wxID_ANY, _("About DCP-o-matic"))
+       : wxDialog(parent, wxID_ANY, variant::wx::insert_dcpomatic(_("About %s")))
 {
        auto overall_sizer = new wxBoxSizer (wxVERTICAL);
        auto sizer = new wxBoxSizer (wxVERTICAL);
@@ -53,7 +54,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
        wxFont version_font (*wxNORMAL_FONT);
        version_font.SetWeight (wxFONTWEIGHT_BOLD);
 
-       auto t = new StaticText (this, _("DCP-o-matic"));
+       auto t = new StaticText(this, variant::wx::dcpomatic());
        t->SetFont (title_font);
        sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 16));
 
@@ -86,7 +87,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
 
        t = new StaticText (
                this,
-               _("(C) 2012-2023 Carl Hetherington, Terrence Meiczinger\n Ole Laursen"),
+               _("(C) 2012-2024 Carl Hetherington, Terrence Meiczinger\nOle Laursen, Aaron Boxer"),
                wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
                );
 
@@ -99,6 +100,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
        written_by.Add (wxT ("Terrence Meiczinger"));
        written_by.Add (wxT ("Mart Jansink"));
        written_by.Add (wxT ("Ole Laursen"));
+       written_by.Add (wxT ("Aaron Boxer"));
        add_section (_("Written by"), written_by);
 
        wxArrayString with_help_from;
@@ -123,6 +125,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
        translated_by.Add (wxT ("Cherif Ben Brahim"));
        translated_by.Add (wxT ("Massimiliano Broggi"));
        translated_by.Add (wxT ("Dan Cohen"));
+       translated_by.Add (wxT ("Akivili Collindort"));
        translated_by.Add (wxT ("Davide Dall'AraCiao"));
        translated_by.Add (wxT ("Uwe Dittes"));
        translated_by.Add (wxT ("Михаил Эпштейн"));
@@ -142,6 +145,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
        translated_by.Add (wxT ("David Perrenoud"));
        translated_by.Add (wxT ("Olivier Perriere"));
        translated_by.Add (wxT ("Markus Raab"));
+       translated_by.Add (wxT ("Soleyman Rahmani"));
        translated_by.Add (wxT ("Tiago Casal Ribeiro"));
        translated_by.Add (wxT ("Davide Sanvito"));
        translated_by.Add (wxT ("Marek Skrzelowski"));
@@ -151,12 +155,11 @@ AboutDialog::AboutDialog (wxWindow* parent)
        translated_by.Add (wxT ("Igor Voytovich"));
        translated_by.Add (wxT ("Rov (若文)"));
        translated_by.Add (wxT ("刘汉源"));
+       translated_by.Add (wxT ("poppinzhang"));
        add_section (_("Translated by"), translated_by);
 
        wxArrayString patrons;
        patrons.Add ("Lightbender Post");
-       patrons.Add ("Drop-out Cinema");
-       patrons.Add ("Root & Rust Creative");
        add_section (_("Patrons"), patrons);
 
        wxArrayString subscribers;
@@ -230,6 +233,8 @@ AboutDialog::AboutDialog (wxWindow* parent)
        tested_by.Add (wxT ("Andreas Weiss"));
        tested_by.Add (wxT ("Paul Willmott"));
        tested_by.Add (wxT ("Wolfgang Woehl"));
+       tested_by.Add (wxT ("Benno Zwanenburg"));
+       tested_by.Add (wxT ("Дима Агатов"));
        add_section (_("Tested by"), tested_by);
 
        sizer->Add (_notebook, wxSizerFlags().Centre().Border(wxALL, 16));
@@ -252,7 +257,7 @@ void
 AboutDialog::add_section (wxString name, wxArrayString credits)
 {
        static auto first = true;
-       int const N = 4;
+       int const N = 3;
 
        auto panel = new wxScrolledWindow (_notebook);
        panel->SetMaxSize (wxSize (-1, 380));
@@ -260,22 +265,23 @@ AboutDialog::add_section (wxString name, wxArrayString credits)
        panel->SetScrollRate (0, 32);
        auto overall_sizer = new wxBoxSizer (wxHORIZONTAL);
 
-       vector<wxSizer*> sizers;
-
-       for (int i = 0; i < N; ++i) {
-               sizers.push_back (new wxBoxSizer (wxVERTICAL));
-               overall_sizer->Add (sizers.back (), 1, wxEXPAND | wxALL, 6);
-       }
-
+       vector<wxString> strings(N);
        int c = 0;
        for (size_t i = 0; i < credits.Count(); ++i) {
-               add_label_to_sizer (sizers[c], panel, credits[i], false);
+               strings[c] += credits[i] + wxT("\n");
                ++c;
                if (c == N) {
                        c = 0;
                }
        }
 
+       for (int i = 0; i < N; ++i) {
+               auto label = new wxStaticText(panel, wxID_ANY, strings[i]);
+               auto sizer = new wxBoxSizer(wxVERTICAL);
+               sizer->Add(label);
+               overall_sizer->Add(sizer, 1, wxEXPAND | wxALL, 6);
+       }
+
        panel->SetSizerAndFit (overall_sizer);
        _notebook->AddPage (panel, name, first);
        first = false;