From: Carl Hetherington Date: Tue, 8 Sep 2020 19:37:18 +0000 (+0200) Subject: Use wxString for EditableListColumn. X-Git-Tag: v2.15.102~16 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=5d9de49a60c70dac3213ef8de040fcfe8bfc58aa Use wxString for EditableListColumn. --- diff --git a/src/wx/cinema_dialog.cc b/src/wx/cinema_dialog.cc index a4372ae77..ecb7d8107 100644 --- a/src/wx/cinema_dialog.cc +++ b/src/wx/cinema_dialog.cc @@ -71,7 +71,7 @@ CinemaDialog::CinemaDialog (wxWindow* parent, wxString title, string name, list< copy (emails.begin(), emails.end(), back_inserter (_emails)); vector columns; - columns.push_back (EditableListColumn(wx_to_std(_("Address")))); + columns.push_back (EditableListColumn(_("Address"))); _email_list = new EditableList ( this, columns, bind (&CinemaDialog::get_emails, this), bind (&CinemaDialog::set_emails, this, _1), bind (&column, _1) ); diff --git a/src/wx/editable_list.h b/src/wx/editable_list.h index 58d0e3885..d53da6cbe 100644 --- a/src/wx/editable_list.h +++ b/src/wx/editable_list.h @@ -31,18 +31,18 @@ class EditableListColumn { public: - EditableListColumn (std::string name_) + EditableListColumn (wxString name_) : name (name_) , growable (false) {} - EditableListColumn (std::string name_, boost::optional width_, bool growable_) + EditableListColumn (wxString name_, boost::optional width_, bool growable_) : name (name_) , width (width_) , growable (growable_) {} - std::string name; + wxString name; boost::optional 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; } diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index 508d06c67..fe80aeae0 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -516,7 +516,7 @@ private: _panel->GetSizer()->Add (_use_any_servers, 0, wxALL, _border); vector columns; - columns.push_back (EditableListColumn(wx_to_std(_("IP address / host name")))); + columns.push_back (EditableListColumn(_("IP address / host name"))); _servers_list = new EditableList ( _panel, columns, @@ -837,7 +837,7 @@ private: table->Add (_from, 1, wxEXPAND | wxALL); vector 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 ( _panel, @@ -969,7 +969,7 @@ private: table->Add (_to, 1, wxEXPAND | wxALL); vector 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 ( _panel, diff --git a/src/wx/metadata_dialog.cc b/src/wx/metadata_dialog.cc index ca820d1c4..2398ce2dc 100644 --- a/src/wx/metadata_dialog.cc +++ b/src/wx/metadata_dialog.cc @@ -60,8 +60,8 @@ MetadataDialog::MetadataDialog (wxWindow* parent, weak_ptr film) } vector 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 ( this, columns, diff --git a/src/wx/player_config_dialog.cc b/src/wx/player_config_dialog.cc index 00a74c659..4c3e2ca17 100644 --- a/src/wx/player_config_dialog.cc +++ b/src/wx/player_config_dialog.cc @@ -494,11 +494,11 @@ private: void setup () { vector 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 ( _panel, columns, diff --git a/src/wx/recipient_dialog.cc b/src/wx/recipient_dialog.cc index f0bb54708..1d36046dd 100644 --- a/src/wx/recipient_dialog.cc +++ b/src/wx/recipient_dialog.cc @@ -84,7 +84,7 @@ RecipientDialog::RecipientDialog ( copy (emails.begin(), emails.end(), back_inserter (_emails)); vector columns; - columns.push_back (EditableListColumn(wx_to_std(_("Address")))); + columns.push_back (EditableListColumn(_("Address"))); _email_list = new EditableList ( this, columns, bind(&RecipientDialog::get_emails, this), bind(&RecipientDialog::set_emails, this, _1), bind(&column, _1) ); diff --git a/src/wx/screen_dialog.cc b/src/wx/screen_dialog.cc index f6245f010..7f309ba66 100644 --- a/src/wx/screen_dialog.cc +++ b/src/wx/screen_dialog.cc @@ -149,7 +149,7 @@ ScreenDialog::ScreenDialog ( ++r; vector columns; - columns.push_back (EditableListColumn(wx_to_std(_("Thumbprint")))); + columns.push_back (EditableListColumn(_("Thumbprint"))); _trusted_device_list = new EditableList ( this, columns,