*/
/** @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>
#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"
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);
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);
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"));
_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;
}
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