Merge master.
[dcpomatic.git] / src / wx / config_dialog.cc
index 36433611470ff7ee14f8f0ed2de7e2f7f45b49d8..c3eebc01515451d5a33529926bc6f039c6cbd166 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 /** @file src/config_dialog.cc
- *  @brief A dialogue to edit DVD-o-matic configuration.
+ *  @brief A dialogue to edit DCP-o-matic configuration.
  */
 
 #include <iostream>
@@ -41,7 +41,7 @@ using namespace std;
 using boost::bind;
 
 ConfigDialog::ConfigDialog (wxWindow* parent)
-       : wxDialog (parent, wxID_ANY, _("DVD-o-matic Preferences"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
+       : wxDialog (parent, wxID_ANY, _("DCP-o-matic Preferences"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
 {
        wxFlexGridSizer* table = new wxFlexGridSizer (3, 6, 6);
        table->AddGrowableCol (1, 1);
@@ -53,11 +53,12 @@ ConfigDialog::ConfigDialog (wxWindow* parent)
        _language->Append (wxT ("Français"));
        _language->Append (wxT ("Italiano"));
        _language->Append (wxT ("Español"));
+       _language->Append (wxT ("Svenska"));
        table->Add (_language, 1, wxEXPAND);
        table->AddSpacer (0);
 
        table->AddSpacer (0);
-       wxStaticText* restart = add_label_to_sizer (table, this, _("(restart DVD-o-matic to see language changes)"));
+       wxStaticText* restart = add_label_to_sizer (table, this, _("(restart DCP-o-matic to see language changes)"));
        wxFont font = restart->GetFont();
        font.SetStyle (wxFONTSTYLE_ITALIC);
        font.SetPointSize (font.GetPointSize() - 1);
@@ -158,6 +159,8 @@ ConfigDialog::ConfigDialog (wxWindow* parent)
                _language->SetSelection (2);
        } else if (config->language().get_value_or ("") == "es") {
                _language->SetSelection (3);
+       } else if (config->language().get_value_or ("") == "sv") {
+               _language->SetSelection (4);
        } else {
                _language->SetSelection (0);
        }
@@ -223,7 +226,7 @@ ConfigDialog::language_changed (wxCommandEvent &)
 {
        switch (_language->GetSelection ()) {
        case 0:
-               Config::instance()->set_language ("");
+               Config::instance()->set_language ("en");
                break;
        case 1:
                Config::instance()->set_language ("fr");
@@ -234,6 +237,9 @@ ConfigDialog::language_changed (wxCommandEvent &)
        case 3:
                Config::instance()->set_language ("es");
                break;
+       case 4:
+               Config::instance()->set_language ("sv");
+               break;
        }
 }