Ignore empty KDM email addresses (#818).
[dcpomatic.git] / src / wx / config_dialog.cc
index c0121b8fe4a908d57d866ef21a9b113ff391ed7e..50d806f35ea7955868fe8d22c05e85ccccad0dc1 100644 (file)
@@ -46,7 +46,6 @@
 #include <wx/preferences.h>
 #include <wx/spinctrl.h>
 #include <wx/filepicker.h>
-#include <boost/lexical_cast.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/foreach.hpp>
 #include <iostream>
@@ -57,7 +56,6 @@ using std::list;
 using std::cout;
 using boost::bind;
 using boost::shared_ptr;
-using boost::lexical_cast;
 using boost::function;
 using boost::optional;
 
@@ -172,6 +170,7 @@ private:
                _language->Append (wxT ("Português europeu"));
                _language->Append (wxT ("Slovenský jazyk"));
                _language->Append (wxT ("Čeština"));
+               _language->Append (wxT ("українська мова"));
                table->Add (_language, wxGBPosition (r, 1));
                ++r;
 
@@ -274,6 +273,8 @@ private:
                        checked_set (_language, 11);
                } else if (config->language().get_value_or ("") == "cs") {
                        checked_set (_language, 12);
+               } else if (config->language().get_value_or ("") == "uk") {
+                       checked_set (_language, 13);
                } else {
                        _language->SetSelection (1);
                }
@@ -350,6 +351,9 @@ private:
                case 12:
                        Config::instance()->set_language ("cs");
                        break;
+               case 13:
+                       Config::instance()->set_language ("uk");
+                       break;
                }
        }
 
@@ -635,6 +639,7 @@ private:
                        columns,
                        boost::bind (&Config::servers, Config::instance()),
                        boost::bind (&Config::set_servers, Config::instance(), _1),
+                       boost::bind (&always_valid),
                        boost::bind (&EncodingServersPage::server_column, this, _1)
                        );
 
@@ -1247,7 +1252,12 @@ private:
                columns.push_back (wx_to_std (_("Address")));
                add_label_to_sizer (table, _panel, _("CC addresses"), true);
                _kdm_cc = new EditableList<string, EmailDialog> (
-                       _panel, columns, bind (&Config::kdm_cc, Config::instance()), bind (&Config::set_kdm_cc, Config::instance(), _1), bind (&column, _1)
+                       _panel,
+                       columns,
+                       bind (&Config::kdm_cc, Config::instance()),
+                       bind (&Config::set_kdm_cc, Config::instance(), _1),
+                       bind (&string_not_empty, _1),
+                       bind (&column, _1)
                        );
                table->Add (_kdm_cc, 1, wxEXPAND | wxALL);