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:
committed by
Vadim Zeitlin
parent
e768046774
commit
f58ea62596
@@ -132,7 +132,7 @@ wxBEGIN_EVENT_TABLE(wxArtBrowserDialog, wxDialog)
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
|
||||
: wxDialog(parent, wxID_ANY, wxT("Art resources browser"),
|
||||
: wxDialog(parent, wxID_ANY, "Art resources browser",
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
|
||||
FillClients(choice);
|
||||
|
||||
subsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
subsizer->Add(new wxStaticText(this, wxID_ANY, wxT("Client:")), 0, wxALIGN_CENTER_VERTICAL);
|
||||
subsizer->Add(new wxStaticText(this, wxID_ANY, "Client:"), 0, wxALIGN_CENTER_VERTICAL);
|
||||
subsizer->Add(choice, 1, wxLEFT, 5);
|
||||
sizer->Add(subsizer, 0, wxALL | wxEXPAND, 10);
|
||||
|
||||
@@ -151,11 +151,11 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
|
||||
|
||||
m_list = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(250, 300),
|
||||
wxLC_REPORT | wxSUNKEN_BORDER);
|
||||
m_list->AppendColumn(wxT("wxArtID"));
|
||||
m_list->AppendColumn("wxArtID");
|
||||
subsizer->Add(m_list, 1, wxEXPAND | wxRIGHT, 10);
|
||||
|
||||
wxSizer *subsub = new wxBoxSizer(wxVERTICAL);
|
||||
m_text = new wxStaticText(this, wxID_ANY, wxT("Size: 333x333"));
|
||||
m_text = new wxStaticText(this, wxID_ANY, "Size: 333x333");
|
||||
subsub->Add(m_text);
|
||||
|
||||
m_canvas = new wxStaticBitmap(this, wxID_ANY, wxBitmap(null_xpm));
|
||||
@@ -165,7 +165,7 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
|
||||
|
||||
sizer->Add(subsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 10);
|
||||
|
||||
wxButton *ok = new wxButton(this, wxID_OK, wxT("Close"));
|
||||
wxButton *ok = new wxButton(this, wxID_OK, "Close");
|
||||
ok->SetDefault();
|
||||
sizer->Add(ok, 0, wxALIGN_RIGHT | wxALL, 10);
|
||||
|
||||
@@ -215,6 +215,6 @@ void wxArtBrowserDialog::SetArtBitmap(const wxArtID& id, const wxArtClient& clie
|
||||
wxBitmap bmp = wxArtProvider::GetBitmap(id, client, size);
|
||||
m_canvas->SetSize(bmp.GetWidth(), bmp.GetHeight());
|
||||
m_canvas->SetBitmap(bmp);
|
||||
m_text->SetLabel(wxString::Format(wxT("Size: %d x %d"), bmp.GetWidth(), bmp.GetHeight()));
|
||||
m_text->SetLabel(wxString::Format("Size: %d x %d", bmp.GetWidth(), bmp.GetHeight()));
|
||||
Refresh();
|
||||
}
|
||||
|
@@ -99,7 +99,7 @@ bool MyApp::OnInit()
|
||||
return false;
|
||||
|
||||
// create the main application window
|
||||
MyFrame *frame = new MyFrame(wxT("wxArtProvider sample"),
|
||||
MyFrame *frame = new MyFrame("wxArtProvider sample",
|
||||
wxPoint(50, 50), wxSize(450, 340));
|
||||
frame->Show(true);
|
||||
return true;
|
||||
@@ -156,23 +156,23 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||
|
||||
// the "About" item should be in the help menu
|
||||
wxMenu *helpMenu = new wxMenu;
|
||||
helpMenu->Append(wxID_ABOUT, wxT("&About\tF1"), wxT("Show about dialog"));
|
||||
helpMenu->Append(wxID_ABOUT, "&About\tF1", "Show about dialog");
|
||||
|
||||
menuFile->AppendCheckItem(ID_PlugProvider, wxT("&Plug-in art provider"), wxT("Enable custom art provider"));
|
||||
menuFile->AppendCheckItem(ID_PlugProvider, "&Plug-in art provider", "Enable custom art provider");
|
||||
menuFile->AppendSeparator();
|
||||
|
||||
#if wxUSE_LOG
|
||||
menuFile->Append(ID_Logs, wxT("&Logging test"), wxT("Show some logging output"));
|
||||
menuFile->Append(ID_Logs, "&Logging test", "Show some logging output");
|
||||
#endif // wxUSE_LOG
|
||||
menuFile->Append(ID_Browser, wxT("&Resources browser"), wxT("Browse all available icons"));
|
||||
menuFile->Append(ID_Browser, "&Resources browser", "Browse all available icons");
|
||||
menuFile->AppendSeparator();
|
||||
|
||||
menuFile->Append(ID_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
|
||||
menuFile->Append(ID_Quit, "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);
|
||||
@@ -190,22 +190,22 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
#if wxUSE_LOG
|
||||
void MyFrame::OnLogs(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxLogMessage(wxT("Some information."));
|
||||
wxLogError(wxT("This is an error."));
|
||||
wxLogWarning(wxT("A warning."));
|
||||
wxLogError(wxT("Yet another error."));
|
||||
wxLogMessage("Some information.");
|
||||
wxLogError("This is an error.");
|
||||
wxLogWarning("A warning.");
|
||||
wxLogError("Yet another error.");
|
||||
wxLog::GetActiveTarget()->Flush();
|
||||
wxLogMessage(wxT("Check/uncheck 'File/Plug-in art provider' and try again."));
|
||||
wxLogMessage("Check/uncheck 'File/Plug-in art provider' and try again.");
|
||||
}
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( wxT("This is the about dialog of wxArtProvider sample.\n")
|
||||
wxT("Welcome to %s"), wxVERSION_STRING);
|
||||
msg.Printf( "This is the about dialog of wxArtProvider sample.\n"
|
||||
"Welcome to %s", wxVERSION_STRING);
|
||||
|
||||
wxMessageBox(msg, wxT("About wxArtProvider sample"),
|
||||
wxMessageBox(msg, "About wxArtProvider sample",
|
||||
wxOK | wxICON_INFORMATION, this);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user