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

@@ -128,7 +128,7 @@ bool MyApp::OnInit()
wxImage::AddHandler(new wxPNGHandler);
// create the main application window
MyFrame *frame = new MyFrame(wxT("wxSplashScreen sample application"));
MyFrame *frame = new MyFrame("wxSplashScreen sample application");
wxBitmap bitmap;
@@ -137,7 +137,7 @@ bool MyApp::OnInit()
bool ok = frame->m_isPda
? bitmap.IsOk()
: bitmap.LoadFile(wxT("splash.png"), wxBITMAP_TYPE_PNG);
: bitmap.LoadFile("splash.png", wxBITMAP_TYPE_PNG);
if (ok)
{
@@ -181,14 +181,14 @@ MyFrame::MyFrame(const wxString& title)
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
helpMenu->Append(wxID_ABOUT, wxT("&About\tF1"), wxT("Show about frame"));
helpMenu->Append(wxID_ABOUT, "&About\tF1", "Show about frame");
menuFile->Append(wxID_EXIT, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
menuFile->Append(wxID_EXIT, "E&xit\tAlt-X", "Quit this program");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(menuFile, wxT("&File"));
menuBar->Append(helpMenu, wxT("&Help"));
menuBar->Append(menuFile, "&File");
menuBar->Append(helpMenu, "&Help");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
@@ -197,7 +197,7 @@ MyFrame::MyFrame(const wxString& title)
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
SetStatusText(wxT("Welcome to wxWidgets!"));
SetStatusText("Welcome to wxWidgets!");
#endif // wxUSE_STATUSBAR
}
@@ -218,7 +218,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
bool ok = m_isPda
? bitmap.IsOk()
: bitmap.LoadFile(wxT("splash.png"), wxBITMAP_TYPE_PNG);
: bitmap.LoadFile("splash.png", wxBITMAP_TYPE_PNG);
if (ok)
{
@@ -236,12 +236,12 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
wxWindow *win = splash->GetSplashWindow();
#if wxUSE_MEDIACTRL
wxMediaCtrl *media = new wxMediaCtrl( win, wxID_EXIT, wxT("press.mpg"), wxPoint(2,2));
wxMediaCtrl *media = new wxMediaCtrl( win, wxID_EXIT, "press.mpg", wxPoint(2,2));
media->Play();
#else
wxStaticText *text = new wxStaticText( win,
wxID_EXIT,
wxT("click somewhere\non this image"),
"click somewhere\non this image",
wxPoint(m_isPda ? 0 : 13,
m_isPda ? 0 : 11)
);