Remove more wxT() macros from samples
Also use wxString instead of wxChar* strings. Closes https://github.com/wxWidgets/wxWidgets/pull/950
This commit is contained in:
committed by
Vadim Zeitlin
parent
480047ee9a
commit
b70ed2d8c8
@@ -178,7 +178,7 @@ wxEND_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(ChoiceWidgetsPage, wxT("Choice"),
|
||||
IMPLEMENT_WIDGETS_PAGE(ChoiceWidgetsPage, "Choice",
|
||||
FAMILY_CTRLS | WITH_ITEMS_CTRLS
|
||||
);
|
||||
|
||||
@@ -207,53 +207,53 @@ void ChoiceWidgetsPage::CreateContent()
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY,
|
||||
wxT("&Set choice parameters"));
|
||||
"&Set choice parameters");
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Sort items"));
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, "&Sort items");
|
||||
|
||||
wxButton *btn = new wxButton(this, ChoicePage_Reset, wxT("&Reset"));
|
||||
wxButton *btn = new wxButton(this, ChoicePage_Reset, "&Reset");
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY,
|
||||
wxT("&Change choice contents"));
|
||||
"&Change choice contents");
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
wxSizer *sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ChoicePage_Add, wxT("&Add this string"));
|
||||
m_textAdd = new wxTextCtrl(this, ChoicePage_AddText, wxT("test item 0"));
|
||||
btn = new wxButton(this, ChoicePage_Add, "&Add this string");
|
||||
m_textAdd = new wxTextCtrl(this, ChoicePage_AddText, "test item 0");
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textAdd, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ChoicePage_AddSeveral, wxT("&Insert a few strings"));
|
||||
btn = new wxButton(this, ChoicePage_AddSeveral, "&Insert a few strings");
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ChoicePage_AddMany, wxT("Add &many strings"));
|
||||
btn = new wxButton(this, ChoicePage_AddMany, "Add &many strings");
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ChoicePage_Change, wxT("C&hange current"));
|
||||
btn = new wxButton(this, ChoicePage_Change, "C&hange current");
|
||||
m_textChange = new wxTextCtrl(this, ChoicePage_ChangeText, wxEmptyString);
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textChange, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ChoicePage_Delete, wxT("&Delete this item"));
|
||||
btn = new wxButton(this, ChoicePage_Delete, "&Delete this item");
|
||||
m_textDelete = new wxTextCtrl(this, ChoicePage_DeleteText, wxEmptyString);
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textDelete, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ChoicePage_DeleteSel, wxT("Delete &selection"));
|
||||
btn = new wxButton(this, ChoicePage_DeleteSel, "Delete &selection");
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ChoicePage_Clear, wxT("&Clear"));
|
||||
btn = new wxButton(this, ChoicePage_Clear, "&Clear");
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ChoicePage_ContainerTests, wxT("Run &tests"));
|
||||
btn = new wxButton(this, ChoicePage_ContainerTests, "Run &tests");
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
// right pane
|
||||
@@ -367,7 +367,7 @@ void ChoiceWidgetsPage::OnButtonAdd(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_textAdd->IsModified() )
|
||||
{
|
||||
// update the default string
|
||||
m_textAdd->SetValue(wxString::Format(wxT("test item %u"), ++s_item));
|
||||
m_textAdd->SetValue(wxString::Format("test item %u", ++s_item));
|
||||
}
|
||||
|
||||
m_choice->Append(s);
|
||||
@@ -379,7 +379,7 @@ void ChoiceWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
|
||||
wxArrayString strings;
|
||||
for ( unsigned int n = 0; n < 1000; n++ )
|
||||
{
|
||||
strings.Add(wxString::Format(wxT("item #%u"), n));
|
||||
strings.Add(wxString::Format("item #%u", n));
|
||||
}
|
||||
m_choice->Append(strings);
|
||||
}
|
||||
@@ -387,9 +387,9 @@ void ChoiceWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
|
||||
void ChoiceWidgetsPage::OnButtonAddSeveral(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxArrayString items;
|
||||
items.Add(wxT("First"));
|
||||
items.Add(wxT("another one"));
|
||||
items.Add(wxT("and the last (very very very very very very very very very very long) one"));
|
||||
items.Add("First");
|
||||
items.Add("another one");
|
||||
items.Add("and the last (very very very very very very very very very very long) one");
|
||||
m_choice->Insert(items, 0);
|
||||
}
|
||||
|
||||
@@ -424,9 +424,9 @@ void ChoiceWidgetsPage::OnUpdateUIAddSeveral(wxUpdateUIEvent& event)
|
||||
void ChoiceWidgetsPage::OnChoice(wxCommandEvent& event)
|
||||
{
|
||||
long sel = event.GetSelection();
|
||||
m_textDelete->SetValue(wxString::Format(wxT("%ld"), sel));
|
||||
m_textDelete->SetValue(wxString::Format("%ld", sel));
|
||||
|
||||
wxLogMessage(wxT("Choice item %ld selected"), sel);
|
||||
wxLogMessage("Choice item %ld selected", sel);
|
||||
}
|
||||
|
||||
void ChoiceWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
|
Reference in New Issue
Block a user