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:
Blake Eryx
2018-09-28 21:45:15 -04:00
committed by Vadim Zeitlin
parent 480047ee9a
commit b70ed2d8c8
67 changed files with 1926 additions and 1932 deletions

View File

@@ -200,7 +200,7 @@ wxEND_EVENT_TABLE()
// implementation
// ============================================================================
IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, wxT("Static"),
IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, "Static",
(int)wxPlatform(GENERIC_CTRLS).If(wxOS_WINDOWS,NATIVE_CTRLS)
);
@@ -260,22 +260,22 @@ void StaticWidgetsPage::CreateContent()
static const wxString halign[] =
{
wxT("left"),
wxT("centre"),
wxT("right"),
"left",
"centre",
"right",
};
static const wxString valign[] =
{
wxT("top"),
wxT("centre"),
wxT("bottom"),
"top",
"centre",
"bottom",
};
m_radioHAlign = new wxRadioBox(this, wxID_ANY, wxT("&Horz alignment"),
m_radioHAlign = new wxRadioBox(this, wxID_ANY, "&Horz alignment",
wxDefaultPosition, wxDefaultSize,
WXSIZEOF(halign), halign, 3);
m_radioVAlign = new wxRadioBox(this, wxID_ANY, wxT("&Vert alignment"),
m_radioVAlign = new wxRadioBox(this, wxID_ANY, "&Vert alignment",
wxDefaultPosition, wxDefaultSize,
WXSIZEOF(valign), valign, 3);
@@ -285,23 +285,23 @@ void StaticWidgetsPage::CreateContent()
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
m_chkEllipsize = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Ellipsize"));
m_chkEllipsize = CreateCheckBoxAndAddToSizer(sizerLeft, "&Ellipsize");
static const wxString ellipsizeMode[] =
{
wxT("&start"),
wxT("&middle"),
wxT("&end"),
"&start",
"&middle",
"&end",
};
m_radioEllipsize = new wxRadioBox(this, wxID_ANY, wxT("&Ellipsize mode"),
m_radioEllipsize = new wxRadioBox(this, wxID_ANY, "&Ellipsize mode",
wxDefaultPosition, wxDefaultSize,
WXSIZEOF(ellipsizeMode), ellipsizeMode,
3);
sizerLeft->Add(m_radioEllipsize, 0, wxGROW | wxALL, 5);
wxButton *btn = new wxButton(this, StaticPage_Reset, wxT("&Reset"));
wxButton *btn = new wxButton(this, StaticPage_Reset, "&Reset");
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
// middle pane
@@ -340,14 +340,14 @@ void StaticWidgetsPage::CreateContent()
// NB: must be done _before_ calling CreateStatic()
Reset();
m_textBox->SetValue(wxT("This is a &box"));
m_textLabel->SetValue(wxT("And this is a\n\tlabel inside the box with a &mnemonic.\n")
wxT("Only this text is affected by the ellipsize settings."));
m_textBox->SetValue("This is a &box");
m_textLabel->SetValue("And this is a\n\tlabel inside the box with a &mnemonic.\n"
"Only this text is affected by the ellipsize settings.");
#if wxUSE_MARKUP
m_textLabelWithMarkup->SetValue(wxT("Another label, this time <b>decorated</b> ")
wxT("with <u>markup</u>; here you need entities ")
wxT("for the symbols: &lt; &gt; &amp; &apos; &quot; ")
wxT(" but you can still place &mnemonics..."));
m_textLabelWithMarkup->SetValue("Another label, this time <b>decorated</b> "
"with <u>markup</u>; here you need entities "
"for the symbols: &lt; &gt; &amp; &apos; &quot; "
" but you can still place &mnemonics...");
#endif // wxUSE_MARKUP
// right pane
@@ -416,7 +416,7 @@ void StaticWidgetsPage::CreateStatic()
switch ( m_radioHAlign->GetSelection() )
{
default:
wxFAIL_MSG(wxT("unexpected radiobox selection"));
wxFAIL_MSG("unexpected radiobox selection");
// fall through
case StaticHAlign_Left:
@@ -435,7 +435,7 @@ void StaticWidgetsPage::CreateStatic()
switch ( m_radioVAlign->GetSelection() )
{
default:
wxFAIL_MSG(wxT("unexpected radiobox selection"));
wxFAIL_MSG("unexpected radiobox selection");
// fall through
case StaticVAlign_Top:
@@ -456,7 +456,7 @@ void StaticWidgetsPage::CreateStatic()
switch ( m_radioEllipsize->GetSelection() )
{
default:
wxFAIL_MSG(wxT("unexpected radiobox selection"));
wxFAIL_MSG("unexpected radiobox selection");
// fall through
case StaticEllipsize_Start:
@@ -603,9 +603,9 @@ void StaticWidgetsPage::OnButtonLabelText(wxCommandEvent& WXUNUSED(event))
// test GetLabel() and GetLabelText(); the first should return the
// label as it is written in the relative text control; the second should
// return the label as it's shown in the wxStaticText
wxLogMessage(wxT("The original label should be '%s'"),
wxLogMessage("The original label should be '%s'",
m_statText->GetLabel());
wxLogMessage(wxT("The label text is '%s'"),
wxLogMessage("The label text is '%s'",
m_statText->GetLabelText());
}
@@ -617,9 +617,9 @@ void StaticWidgetsPage::OnButtonLabelWithMarkupText(wxCommandEvent& WXUNUSED(eve
// test GetLabel() and GetLabelText(); the first should return the
// label as it is written in the relative text control; the second should
// return the label as it's shown in the wxStaticText
wxLogMessage(wxT("The original label should be '%s'"),
wxLogMessage("The original label should be '%s'",
m_statMarkup->GetLabel());
wxLogMessage(wxT("The label text is '%s'"),
wxLogMessage("The label text is '%s'",
m_statMarkup->GetLabelText());
}
#endif // wxUSE_MARKUP