Remove (most) occurrences of wxT() macro from the samples

Also replace wxChar* with wxString.

Closes https://github.com/wxWidgets/wxWidgets/pull/945
This commit is contained in:
Blake-Eryx
2018-09-23 01:15:08 +02:00
committed by Vadim Zeitlin
parent e768046774
commit f58ea62596
93 changed files with 4362 additions and 4358 deletions

View File

@@ -100,11 +100,11 @@ private:
{
if ( m_panel->NavigateIn(flags) )
{
wxLogStatus(this, wxT("Navigation event processed"));
wxLogStatus(this, "Navigation event processed");
}
else
{
wxLogStatus(this, wxT("Navigation event ignored"));
wxLogStatus(this, "Navigation event ignored");
}
}
@@ -143,8 +143,8 @@ private:
if ( event.GetKeyCode() == WXK_TAB &&
wxMessageBox
(
wxT("Let the Tab be used for navigation?"),
wxT("wxWidgets TabOrder sample: Tab key pressed"),
"Let the Tab be used for navigation?",
"wxWidgets TabOrder sample: Tab key pressed",
wxICON_QUESTION | wxYES_NO,
this
) != wxYES )
@@ -194,7 +194,7 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
wxEND_EVENT_TABLE()
MyFrame::MyFrame()
: wxFrame(NULL, wxID_ANY, wxT("TabOrder wxWidgets Sample"),
: wxFrame(NULL, wxID_ANY, "TabOrder wxWidgets Sample",
wxDefaultPosition, wxSize(700, 450))
{
SetIcon(wxICON(sample));
@@ -205,14 +205,14 @@ MyFrame::MyFrame()
menuFile->Append(TabOrder_Quit);
wxMenu *menuNav = new wxMenu;
menuNav->Append(TabOrder_TabForward, wxT("Tab &forward\tCtrl-F"),
wxT("Emulate a <Tab> press"));
menuNav->Append(TabOrder_TabBackward, wxT("Tab &backward\tCtrl-B"),
wxT("Emulate a <Shift-Tab> press"));
menuNav->Append(TabOrder_TabForward, "Tab &forward\tCtrl-F",
"Emulate a <Tab> press");
menuNav->Append(TabOrder_TabBackward, "Tab &backward\tCtrl-B",
"Emulate a <Shift-Tab> press");
wxMenuBar *mbar = new wxMenuBar;
mbar->Append(menuFile, wxT("&File"));
mbar->Append(menuNav, wxT("&Navigate"));
mbar->Append(menuFile, "&File");
mbar->Append(menuNav, "&Navigate");
SetMenuBar(mbar);
@@ -228,8 +228,8 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageBox(wxT("Tab navigation sample\n(c) 2007 Vadim Zeitlin"),
wxT("About TabOrder wxWidgets Sample"), wxOK, this);
wxMessageBox("Tab navigation sample\n(c) 2007 Vadim Zeitlin",
"About TabOrder wxWidgets Sample", wxOK, this);
}
void MyFrame::OnTabForward(wxCommandEvent& WXUNUSED(event))
@@ -254,11 +254,11 @@ void MyFrame::OnIdle( wxIdleEvent& WXUNUSED(event) )
wxString msg;
if ( focus )
{
msg.Printf(wxT("Focus is at %s"), s_windowFocus->GetName().c_str());
msg.Printf("Focus is at %s", s_windowFocus->GetName().c_str());
}
else
{
msg = wxT("No focus");
msg = "No focus";
}
SetStatusText(msg, StatusPane_Focus);
@@ -273,16 +273,16 @@ MyPanel::MyPanel(wxWindow *parent)
: wxPanel(parent, wxID_ANY)
{
wxNotebook *notebook = new wxNotebook(this, wxID_ANY);
notebook->AddPage(CreateButtonPage(notebook), wxT("Button"));
notebook->AddPage(CreateTextPage(notebook), wxT("Text"));
notebook->AddPage(CreateButtonPage(notebook), "Button");
notebook->AddPage(CreateTextPage(notebook), "Text");
wxSizer *sizerV = new wxBoxSizer(wxVERTICAL);
sizerV->Add(notebook, wxSizerFlags(1).Expand());
wxListBox *lbox = new wxListBox(this, wxID_ANY);
lbox->AppendString(wxT("Just a"));
lbox->AppendString(wxT("simple"));
lbox->AppendString(wxT("listbox"));
lbox->AppendString("Just a");
lbox->AppendString("simple");
lbox->AppendString("listbox");
sizerV->Add(lbox, wxSizerFlags(1).Expand());
SetSizerAndFit(sizerV);
@@ -294,10 +294,10 @@ wxWindow *MyPanel::CreateButtonPage(wxWindow *parent)
wxPanel *page = new wxPanel(parent);
wxSizer *sizerPage = new wxBoxSizer(wxHORIZONTAL);
sizerPage->Add(new wxButton(page, wxID_ANY, wxT("&First")), flagsBorder);
sizerPage->Add(new wxStaticText(page, wxID_ANY, wxT("[st&atic]")),
sizerPage->Add(new wxButton(page, wxID_ANY, "&First"), flagsBorder);
sizerPage->Add(new wxStaticText(page, wxID_ANY, "[st&atic]"),
flagsBorder);
sizerPage->Add(new wxButton(page, wxID_ANY, wxT("&Second")), flagsBorder);
sizerPage->Add(new wxButton(page, wxID_ANY, "&Second"), flagsBorder);
page->SetSizer(sizerPage);
@@ -312,14 +312,14 @@ wxWindow *MyPanel::CreateTextPage(wxWindow *parent)
wxPanel *page = new wxPanel(parent);
wxSizer *sizerH = new wxBoxSizer(wxHORIZONTAL);
sizerH->Add(new wxStaticText(page, wxID_ANY, wxT("&Label:")), flagsBorder);
sizerH->Add(new MyTabTextCtrl(page, wxT("TAB ignored here")), flagsBorder);
sizerH->Add(new wxStaticText(page, wxID_ANY, "&Label:"), flagsBorder);
sizerH->Add(new MyTabTextCtrl(page, "TAB ignored here"), flagsBorder);
sizerPage->Add(sizerH, wxSizerFlags(1).Expand());
sizerH = new wxBoxSizer(wxHORIZONTAL);
sizerH->Add(new wxStaticText(page, wxID_ANY, wxT("&Another one:")),
sizerH->Add(new wxStaticText(page, wxID_ANY, "&Another one:"),
flagsBorder);
sizerH->Add(new MyTabTextCtrl(page, wxT("press Tab here"), wxTE_PROCESS_TAB),
sizerH->Add(new MyTabTextCtrl(page, "press Tab here", wxTE_PROCESS_TAB),
flagsBorder);
sizerPage->Add(sizerH, wxSizerFlags(1).Expand());