Use wxString for EditableListColumn.
authorCarl Hetherington <cth@carlh.net>
Tue, 8 Sep 2020 19:37:18 +0000 (21:37 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 8 Sep 2020 19:37:18 +0000 (21:37 +0200)
src/wx/cinema_dialog.cc
src/wx/editable_list.h
src/wx/full_config_dialog.cc
src/wx/metadata_dialog.cc
src/wx/player_config_dialog.cc
src/wx/recipient_dialog.cc
src/wx/screen_dialog.cc

index a4372ae..ecb7d81 100644 (file)
@@ -71,7 +71,7 @@ CinemaDialog::CinemaDialog (wxWindow* parent, wxString title, string name, list<
        copy (emails.begin(), emails.end(), back_inserter (_emails));
 
        vector<EditableListColumn> columns;
-       columns.push_back (EditableListColumn(wx_to_std(_("Address"))));
+       columns.push_back (EditableListColumn(_("Address")));
        _email_list = new EditableList<string, EmailDialog> (
                this, columns, bind (&CinemaDialog::get_emails, this), bind (&CinemaDialog::set_emails, this, _1), bind (&column, _1)
                );
index 58d0e38..d53da6c 100644 (file)
 class EditableListColumn
 {
 public:
-       EditableListColumn (std::string name_)
+       EditableListColumn (wxString name_)
                : name (name_)
                , growable (false)
        {}
 
-       EditableListColumn (std::string name_, boost::optional<int> width_, bool growable_)
+       EditableListColumn (wxString name_, boost::optional<int> width_, bool growable_)
                : name (name_)
                , width (width_)
                , growable (growable_)
        {}
 
-       std::string name;
+       wxString name;
        boost::optional<int> width;
        bool growable;
 };
@@ -104,7 +104,7 @@ public:
                BOOST_FOREACH (EditableListColumn i, _columns) {
                        wxListItem ip;
                        ip.SetId (j);
-                       ip.SetText (std_to_wx(i.name));
+                       ip.SetText (i.name);
                        _list->InsertColumn (j, ip);
                        ++j;
                }
index 508d06c..fe80aea 100644 (file)
@@ -516,7 +516,7 @@ private:
                _panel->GetSizer()->Add (_use_any_servers, 0, wxALL, _border);
 
                vector<EditableListColumn> columns;
-               columns.push_back (EditableListColumn(wx_to_std(_("IP address / host name"))));
+               columns.push_back (EditableListColumn(_("IP address / host name")));
                _servers_list = new EditableList<string, ServerDialog> (
                        _panel,
                        columns,
@@ -837,7 +837,7 @@ private:
                table->Add (_from, 1, wxEXPAND | wxALL);
 
                vector<EditableListColumn> columns;
-               columns.push_back (EditableListColumn(wx_to_std(_("Address"))));
+               columns.push_back (EditableListColumn(_("Address")));
                add_label_to_sizer (table, _panel, _("CC addresses"), true);
                _cc = new EditableList<string, EmailDialog> (
                        _panel,
@@ -969,7 +969,7 @@ private:
                table->Add (_to, 1, wxEXPAND | wxALL);
 
                vector<EditableListColumn> columns;
-               columns.push_back (EditableListColumn(wx_to_std(_("Address"))));
+               columns.push_back (EditableListColumn(_("Address")));
                add_label_to_sizer (table, _panel, _("CC addresses"), true);
                _cc = new EditableList<string, EmailDialog> (
                        _panel,
index ca820d1..2398ce2 100644 (file)
@@ -60,8 +60,8 @@ MetadataDialog::MetadataDialog (wxWindow* parent, weak_ptr<Film> film)
        }
 
        vector<EditableListColumn> columns;
-       columns.push_back (EditableListColumn("Agency", 200, true));
-       columns.push_back (EditableListColumn("Label", 50, true));
+       columns.push_back (EditableListColumn(_("Agency"), 200, true));
+       columns.push_back (EditableListColumn(_("Label"), 50, true));
        _ratings = new EditableList<dcp::Rating, RatingDialog> (
                this,
                columns,
index 00a74c6..4c3e2ca 100644 (file)
@@ -494,11 +494,11 @@ private:
        void setup ()
        {
                vector<EditableListColumn> columns;
-               columns.push_back(EditableListColumn(wx_to_std(_("Manufacturer ID"))));
-               columns.push_back(EditableListColumn(wx_to_std(_("Product code"))));
-               columns.push_back(EditableListColumn(wx_to_std(_("Serial"))));
-               columns.push_back(EditableListColumn(wx_to_std(_("Manufacture week"))));
-               columns.push_back(EditableListColumn(wx_to_std(_("Manufacture year"))));
+               columns.push_back(EditableListColumn(_("Manufacturer ID")));
+               columns.push_back(EditableListColumn(_("Product code")));
+               columns.push_back(EditableListColumn(_("Serial")));
+               columns.push_back(EditableListColumn(_("Manufacture week")));
+               columns.push_back(EditableListColumn(_("Manufacture year")));
                _monitor_list = new EditableList<Monitor, MonitorDialog> (
                        _panel,
                        columns,
index f0bb547..1d36046 100644 (file)
@@ -84,7 +84,7 @@ RecipientDialog::RecipientDialog (
        copy (emails.begin(), emails.end(), back_inserter (_emails));
 
        vector<EditableListColumn> columns;
-       columns.push_back (EditableListColumn(wx_to_std(_("Address"))));
+       columns.push_back (EditableListColumn(_("Address")));
        _email_list = new EditableList<string, EmailDialog> (
                this, columns, bind(&RecipientDialog::get_emails, this), bind(&RecipientDialog::set_emails, this, _1), bind(&column, _1)
                );
index f6245f0..7f309ba 100644 (file)
@@ -149,7 +149,7 @@ ScreenDialog::ScreenDialog (
        ++r;
 
        vector<EditableListColumn> columns;
-       columns.push_back (EditableListColumn(wx_to_std(_("Thumbprint"))));
+       columns.push_back (EditableListColumn(_("Thumbprint")));
        _trusted_device_list = new EditableList<TrustedDevice, TrustedDeviceDialog> (
                this,
                columns,