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
@@ -150,7 +150,7 @@ wxEND_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS GENERIC_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(FilePickerWidgetsPage, wxT("FilePicker"),
|
||||
IMPLEMENT_WIDGETS_PAGE(FilePickerWidgetsPage, "FilePicker",
|
||||
PICKER_CTRLS | FAMILY_CTRLS);
|
||||
|
||||
FilePickerWidgetsPage::FilePickerWidgetsPage(WidgetsBookCtrl *book,
|
||||
@@ -164,17 +164,17 @@ void FilePickerWidgetsPage::CreateContent()
|
||||
// left pane
|
||||
wxSizer *boxleft = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
static const wxString mode[] = { wxT("open"), wxT("save") };
|
||||
m_radioFilePickerMode = new wxRadioBox(this, wxID_ANY, wxT("wxFilePicker mode"),
|
||||
static const wxString mode[] = { "open", "save" };
|
||||
m_radioFilePickerMode = new wxRadioBox(this, wxID_ANY, "wxFilePicker mode",
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(mode), mode);
|
||||
boxleft->Add(m_radioFilePickerMode, 0, wxALL|wxGROW, 5);
|
||||
|
||||
wxStaticBoxSizer *filebox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&FilePicker style"));
|
||||
m_chkFileTextCtrl = CreateCheckBoxAndAddToSizer(filebox, wxT("With textctrl"));
|
||||
m_chkFileOverwritePrompt = CreateCheckBoxAndAddToSizer(filebox, wxT("Overwrite prompt"));
|
||||
m_chkFileMustExist = CreateCheckBoxAndAddToSizer(filebox, wxT("File must exist"));
|
||||
m_chkFileChangeDir = CreateCheckBoxAndAddToSizer(filebox, wxT("Change working dir"));
|
||||
wxStaticBoxSizer *filebox = new wxStaticBoxSizer(wxVERTICAL, this, "&FilePicker style");
|
||||
m_chkFileTextCtrl = CreateCheckBoxAndAddToSizer(filebox, "With textctrl");
|
||||
m_chkFileOverwritePrompt = CreateCheckBoxAndAddToSizer(filebox, "Overwrite prompt");
|
||||
m_chkFileMustExist = CreateCheckBoxAndAddToSizer(filebox, "File must exist");
|
||||
m_chkFileChangeDir = CreateCheckBoxAndAddToSizer(filebox, "Change working dir");
|
||||
m_chkSmall = CreateCheckBoxAndAddToSizer(filebox, "&Small version");
|
||||
|
||||
boxleft->Add(filebox, 0, wxALL|wxGROW, 5);
|
||||
@@ -189,7 +189,7 @@ void FilePickerWidgetsPage::CreateContent()
|
||||
|
||||
boxleft->AddSpacer(10);
|
||||
|
||||
boxleft->Add(new wxButton(this, PickerPage_Reset, wxT("&Reset")),
|
||||
boxleft->Add(new wxButton(this, PickerPage_Reset, "&Reset"),
|
||||
0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
Reset(); // set checkboxes state
|
||||
@@ -245,7 +245,7 @@ void FilePickerWidgetsPage::CreatePicker()
|
||||
// pass an empty string as initial file
|
||||
m_filePicker = new wxFilePickerCtrl(this, PickerPage_File,
|
||||
wxEmptyString,
|
||||
wxT("Hello!"), wxT("*"),
|
||||
"Hello!", "*",
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
style);
|
||||
}
|
||||
@@ -310,7 +310,7 @@ void FilePickerWidgetsPage::OnButtonReset(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void FilePickerWidgetsPage::OnFileChange(wxFileDirPickerEvent& event)
|
||||
{
|
||||
wxLogMessage(wxT("The file changed to '%s' ! The current working directory is '%s'"),
|
||||
wxLogMessage("The file changed to '%s' ! The current working directory is '%s'",
|
||||
event.GetPath().c_str(), wxGetCwd().c_str());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user