+ _allow_any_dcp_frame_rate = new wxCheckBox (panel, wxID_ANY, _("Allow any DCP frame rate"));
+ table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxALL);
+ table->AddSpacer (0);
+
+ add_label_to_sizer (table, panel, _("Outgoing mail server"), true);
+ _mail_server = new wxTextCtrl (panel, wxID_ANY);
+ table->Add (_mail_server, 1, wxEXPAND | wxALL);
+
+ add_label_to_sizer (table, panel, _("Mail user name"), true);
+ _mail_user = new wxTextCtrl (panel, wxID_ANY);
+ table->Add (_mail_user, 1, wxEXPAND | wxALL);
+
+ add_label_to_sizer (table, panel, _("Mail password"), true);
+ _mail_password = new wxTextCtrl (panel, wxID_ANY);
+ table->Add (_mail_password, 1, wxEXPAND | wxALL);
+
+ wxStaticText* plain = add_label_to_sizer (table, panel, _("(password will be stored on disk in plaintext)"), false);
+ plain->SetFont (font);
+ table->AddSpacer (0);
+
+ add_label_to_sizer (table, panel, _("From address for KDM emails"), true);
+ _kdm_from = new wxTextCtrl (panel, wxID_ANY);
+ table->Add (_kdm_from, 1, wxEXPAND | wxALL);
+
+ _check_for_updates = new wxCheckBox (panel, wxID_ANY, _("Check for updates on startup"));
+ table->Add (_check_for_updates, 1, wxEXPAND | wxALL);
+ table->AddSpacer (0);
+
+ _check_for_test_updates = new wxCheckBox (panel, wxID_ANY, _("Check for testing updates as well as stable ones"));
+ table->Add (_check_for_test_updates, 1, wxEXPAND | wxALL);
+ table->AddSpacer (0);
+
+ Config* config = Config::instance ();
+
+ _set_language->SetValue (config->language ());
+
+ if (config->language().get_value_or ("") == "fr") {
+ _language->SetSelection (3);
+ } else if (config->language().get_value_or ("") == "it") {
+ _language->SetSelection (4);
+ } else if (config->language().get_value_or ("") == "es") {
+ _language->SetSelection (2);
+ } else if (config->language().get_value_or ("") == "sv") {
+ _language->SetSelection (6);
+ } else if (config->language().get_value_or ("") == "de") {
+ _language->SetSelection (0);
+ } else if (config->language().get_value_or ("") == "nl") {
+ _language->SetSelection (5);
+ } else {
+ _language->SetSelection (1);
+ }
+
+ setup_language_sensitivity ();
+
+ _set_language->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::set_language_changed, this));
+ _language->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&GeneralPage::language_changed, this));
+
+ _num_local_encoding_threads->SetRange (1, 128);
+ _num_local_encoding_threads->SetValue (config->num_local_encoding_threads ());
+ _num_local_encoding_threads->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&GeneralPage::num_local_encoding_threads_changed, this));
+
+ _maximum_j2k_bandwidth->SetRange (1, 500);
+ _maximum_j2k_bandwidth->SetValue (config->maximum_j2k_bandwidth() / 1000000);
+ _maximum_j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&GeneralPage::maximum_j2k_bandwidth_changed, this));
+
+ _mail_server->SetValue (std_to_wx (config->mail_server ()));
+ _mail_server->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::mail_server_changed, this));
+ _mail_user->SetValue (std_to_wx (config->mail_user ()));
+ _mail_user->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::mail_user_changed, this));
+ _mail_password->SetValue (std_to_wx (config->mail_password ()));
+ _mail_password->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::mail_password_changed, this));
+ _kdm_from->SetValue (std_to_wx (config->kdm_from ()));
+ _kdm_from->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::kdm_from_changed, this));
+ _check_for_updates->SetValue (config->check_for_updates ());
+ _check_for_updates->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::check_for_updates_changed, this));
+ _check_for_test_updates->SetValue (config->check_for_test_updates ());
+ _check_for_test_updates->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::check_for_test_updates_changed, this));
+ _allow_any_dcp_frame_rate->SetValue (config->allow_any_dcp_frame_rate ());
+ _allow_any_dcp_frame_rate->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::allow_any_dcp_frame_rate_changed, this));
+
+ return panel;
+ }