Ubuntu 13.10 appears to have a broken GtkFileChooserButton in its GTK as well as...
[dcpomatic.git] / src / wx / about_dialog.cc
index 84cfbce08a4a03396586e6c20ca1dc97bb2ba9c8..12f46812af04cc88efb7d85c3c508bbcca549ede 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include <wx/notebook.h>
+#include <wx/hyperlink.h>
 #include "lib/version.h"
 #include "lib/compose.hpp"
 #include "about_dialog.h"
 using std::vector;
 
 AboutDialog::AboutDialog (wxWindow* parent)
-       : wxDialog (parent, wxID_ANY, _("About DVD-o-matic"))
+       : wxDialog (parent, wxID_ANY, _("About DCP-o-matic"))
 {
+       wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
        wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
        
        wxFont title_font (*wxNORMAL_FONT);
-       title_font.SetPointSize (title_font.GetPointSize() + 4);
+       title_font.SetPointSize (title_font.GetPointSize() + 12);
        title_font.SetWeight (wxFONTWEIGHT_BOLD);
 
+       wxFont subtitle_font (*wxNORMAL_FONT);
+       subtitle_font.SetPointSize (subtitle_font.GetPointSize() + 2);
+
        wxFont version_font (*wxNORMAL_FONT);
        version_font.SetWeight (wxFONTWEIGHT_BOLD);
        
-       wxStaticText* t = new wxStaticText (this, wxID_ANY, _("DVD-o-matic"));
+       wxStaticText* t = new wxStaticText (this, wxID_ANY, _("DCP-o-matic"));
        t->SetFont (title_font);
-       sizer->Add (t, wxSizerFlags().Centre().Border());
+       sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 16));
 
        wxString s;
-       if (strcmp (dvdomatic_git_commit, "release") == 0) {
-               t = new wxStaticText (this, wxID_ANY, std_to_wx (String::compose ("Version %1", dvdomatic_version)));
+       if (strcmp (dcpomatic_git_commit, "release") == 0) {
+               t = new wxStaticText (this, wxID_ANY, std_to_wx (String::compose ("Version %1", dcpomatic_version)));
        } else {
-               t = new wxStaticText (this, wxID_ANY, std_to_wx (String::compose ("Version %1 git %2", dvdomatic_version, dvdomatic_git_commit)));
+               t = new wxStaticText (this, wxID_ANY, std_to_wx (String::compose ("Version %1 git %2", dcpomatic_version, dcpomatic_git_commit)));
        }
        t->SetFont (version_font);
-       sizer->Add (t, wxSizerFlags().Centre().Border());
+       sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 2));
        sizer->AddSpacer (12);
 
        t = new wxStaticText (
@@ -56,8 +61,17 @@ AboutDialog::AboutDialog (wxWindow* parent)
                _("Free, open-source DCP generation from almost anything."),
                wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
                );
+       t->SetFont (subtitle_font);
        
-       sizer->Add (t, wxSizerFlags().Centre().Border());
+       sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 8));
+
+       wxHyperlinkCtrl* h = new wxHyperlinkCtrl (
+               this, wxID_ANY,
+               wxT ("dcpomatic.com"),
+               wxT ("http://dcpomatic.com")
+               );
+
+       sizer->Add (h, wxSizerFlags().Centre().Border(wxALL, 8));
 
        t = new wxStaticText (
                this, wxID_ANY,
@@ -65,7 +79,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
                wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
                );
        
-       sizer->Add (t, wxSizerFlags().Centre().Border());
+       sizer->Add (t, wxSizerFlags().Centre().Border(wxLEFT | wxRIGHT, 16));
 
        _notebook = new wxNotebook (this, wxID_ANY);
 
@@ -91,6 +105,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
        supported_by.Add (wxT ("Manual AC"));
        supported_by.Add (wxT ("Theo Lipfert"));
        supported_by.Add (wxT ("Olivier Lemaire"));
+       supported_by.Add (wxT ("Mattias Mattsson"));
        supported_by.Add (wxT ("Andrä Steiner"));
        supported_by.Add (wxT ("Jonathan Jensen"));
        supported_by.Add (wxT ("Kjarten Michaelsen"));
@@ -104,15 +119,21 @@ AboutDialog::AboutDialog (wxWindow* parent)
        supported_by.Add (wxT ("Lasse Salling"));
        supported_by.Add (wxT ("Andres Fink"));
        supported_by.Add (wxT ("Kieran Carroll"));
+       supported_by.Add (wxT ("Kambiz Afshar"));
+       supported_by.Add (wxT ("Sean Leigh"));
+       supported_by.Add (wxT ("Wolfram Weber"));
        add_section (_("Supported by"), supported_by);
 
-       sizer->Add (_notebook, wxSizerFlags().Centre().Border().Expand());
-       
-#if 0  
-       info.SetWebSite (wxT ("http://carlh.net/software/dvdomatic"));
-#endif
+       sizer->Add (_notebook, wxSizerFlags().Centre().Border(wxALL, 16).Expand());
+
+       overall_sizer->Add (sizer);
 
-       SetSizerAndFit (sizer);
+       wxSizer* buttons = CreateButtonSizer (wxOK);
+       if (buttons) {
+               overall_sizer->Add (buttons, 1, wxEXPAND | wxALL, 4);
+       }
+       
+       SetSizerAndFit (overall_sizer);
 }
 
 void
@@ -133,7 +154,7 @@ AboutDialog::add_section (wxString name, wxArrayString credits)
 
        int c = 0;
        for (size_t i = 0; i < credits.Count(); ++i) {
-               add_label_to_sizer (sizers[c], panel, credits[i]);
+               add_label_to_sizer (sizers[c], panel, credits[i], false);
                ++c;
                if (c == N) {
                        c = 0;