Merge master.
[dcpomatic.git] / src / wx / config_dialog.cc
index 50b8990b13a2afcd1c25319512cfc391e9a1275e..0b13b9c8888d3abd1fd9474b6365e69f4cb28e7a 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 /** @file src/config_dialog.cc
- *  @brief A dialogue to edit DCP-o-matic configuration.
+ *  @brief A dialogue to edit DVD-o-matic configuration.
  */
 
 #include <iostream>
@@ -28,7 +28,7 @@
 #include <wx/notebook.h>
 #include "lib/config.h"
 #include "lib/server.h"
-#include "lib/format.h"
+#include "lib/ratio.h"
 #include "lib/scaler.h"
 #include "lib/filter.h"
 #include "lib/dcp_content_type.h"
@@ -43,7 +43,7 @@ using namespace std;
 using boost::bind;
 
 ConfigDialog::ConfigDialog (wxWindow* parent)
-       : wxDialog (parent, wxID_ANY, _("DCP-o-matic Preferences"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
+       : wxDialog (parent, wxID_ANY, _("DVD-o-matic Preferences"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
 {
        wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
        _notebook = new wxNotebook (this, wxID_ANY);
@@ -95,7 +95,7 @@ ConfigDialog::make_misc_panel ()
        table->Add (_language, 1, wxEXPAND);
        table->AddSpacer (0);
 
-       wxStaticText* restart = add_label_to_sizer (table, _misc_panel, _("(restart DCP-o-matic to see language changes)"));
+       wxStaticText* restart = add_label_to_sizer (table, _misc_panel, _("(restart DVD-o-matic to see language changes)"));
        wxFont font = restart->GetFont();
        font.SetStyle (wxFONTSTYLE_ITALIC);
        font.SetPointSize (font.GetPointSize() - 1);
@@ -127,9 +127,9 @@ ConfigDialog::make_misc_panel ()
        table->Add (_default_dci_metadata_button);
        table->AddSpacer (1);
 
-       add_label_to_sizer (table, _misc_panel, _("Default format"));
-       _default_format = new wxChoice (_misc_panel, wxID_ANY);
-       table->Add (_default_format);
+       add_label_to_sizer (table, _misc_panel, _("Default container"));
+       _default_container = new wxChoice (_misc_panel, wxID_ANY);
+       table->Add (_default_container);
        table->AddSpacer (1);
 
        add_label_to_sizer (table, _misc_panel, _("Default content type"));
@@ -171,17 +171,17 @@ ConfigDialog::make_misc_panel ()
 
        _default_dci_metadata_button->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (ConfigDialog::edit_default_dci_metadata_clicked), 0, this);
 
-       vector<Format const *> fmt = Format::all ();
+       vector<Ratio const *> ratio = Ratio::all ();
        int n = 0;
-       for (vector<Format const *>::iterator i = fmt.begin(); i != fmt.end(); ++i) {
-               _default_format->Append (std_to_wx ((*i)->name ()));
-               if (*i == config->default_format ()) {
-                       _default_format->SetSelection (n);
+       for (vector<Ratio const *>::iterator i = ratio.begin(); i != ratio.end(); ++i) {
+               _default_container->Append (std_to_wx ((*i)->nickname ()));
+               if (*i == config->default_container ()) {
+                       _default_container->SetSelection (n);
                }
                ++n;
        }
 
-       _default_format->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (ConfigDialog::default_format_changed), 0, this);
+       _default_container->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (ConfigDialog::default_container_changed), 0, this);
        
        vector<DCPContentType const *> const ct = DCPContentType::all ();
        n = 0;
@@ -533,10 +533,10 @@ ConfigDialog::default_still_length_changed (wxCommandEvent &)
 }
 
 void
-ConfigDialog::default_format_changed (wxCommandEvent &)
+ConfigDialog::default_container_changed (wxCommandEvent &)
 {
-       vector<Format const *> fmt = Format::all ();
-       Config::instance()->set_default_format (fmt[_default_format->GetSelection()]);
+       vector<Ratio const *> ratio = Ratio::all ();
+       Config::instance()->set_default_container (ratio[_default_container->GetSelection()]);
 }
 
 void