Fix more cases of controls in static boxes that don't use ShuttleGui...

... as in commit f7644c7
This commit is contained in:
Paul Licameli 2019-03-28 11:55:54 -04:00
parent bcc2e0d13b
commit 0b160faecc
4 changed files with 11 additions and 12 deletions

View File

@ -338,14 +338,13 @@ void ScreenFrame::PopulateOrExchange(ShuttleGui & S)
S.Id(IdMainWindowLarge).AddButton(_("Resize Large"));
/* i18n-hint: Bkgnd is short for background and appears on a small button
* It is OK to just translate this item as if it said 'Blue' */
wxASSERT(p); // To justify safenew
mBlue = safenew wxToggleButton(p,
mBlue = safenew wxToggleButton(S.GetParent(),
IdToggleBackgroundBlue,
_("Blue Bkgnd"));
S.AddWindow(mBlue);
/* i18n-hint: Bkgnd is short for background and appears on a small button
* It is OK to just translate this item as if it said 'White' */
mWhite = safenew wxToggleButton(p,
mWhite = safenew wxToggleButton(S.GetParent(),
IdToggleBackgroundWhite,
_("White Bkgnd"));
S.AddWindow(mWhite);

View File

@ -55,7 +55,7 @@ void TimeDialog::PopulateOrExchange(ShuttleGui &S)
{
mTimeCtrl = safenew
NumericTextCtrl(
this, wxID_ANY,
S.GetParent(), wxID_ANY,
NumericConverter::TIME,
mFormat,
mTime,

View File

@ -224,7 +224,7 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id,
if (S.GetMode() == eIsCreating)
{
mForegroundStartT = safenew
NumericTextCtrl(this, ID_FOREGROUNDSTART_T,
NumericTextCtrl(S.GetParent(), ID_FOREGROUNDSTART_T,
NumericConverter::TIME,
NumericConverter::HundredthsFormat(),
0.0,
@ -237,7 +237,7 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id,
if (S.GetMode() == eIsCreating)
{
mForegroundEndT = safenew
NumericTextCtrl(this, ID_FOREGROUNDEND_T,
NumericTextCtrl(S.GetParent(), ID_FOREGROUNDEND_T,
NumericConverter::TIME,
NumericConverter::HundredthsFormat(),
0.0,
@ -256,7 +256,7 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id,
if (S.GetMode() == eIsCreating)
{
mBackgroundStartT = safenew
NumericTextCtrl(this, ID_BACKGROUNDSTART_T,
NumericTextCtrl(S.GetParent(), ID_BACKGROUNDSTART_T,
NumericConverter::TIME,
NumericConverter::HundredthsFormat(),
0.0,
@ -269,7 +269,7 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id,
if (S.GetMode() == eIsCreating)
{
mBackgroundEndT = safenew
NumericTextCtrl(this, ID_BACKGROUNDEND_T,
NumericTextCtrl(S.GetParent(), ID_BACKGROUNDEND_T,
NumericConverter::TIME,
NumericConverter::HundredthsFormat(),
0.0,

View File

@ -150,7 +150,7 @@ void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
wxStaticBox* staticBox = S.StartStatic(_("Key Bindings"), 1);
S.StartStatic(_("Key Bindings"), 1);
{
S.StartMultiColumn(3, wxEXPAND);
{
@ -189,7 +189,7 @@ void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S)
mFilterLabel = S.AddVariableText(_("Searc&h:"));
if (!mFilter) {
mFilter = safenew wxTextCtrl(staticBox,
mFilter = safenew wxTextCtrl(S.GetParent(),
FilterID,
wxT(""),
wxDefaultPosition,
@ -217,7 +217,7 @@ void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay(wxEXPAND, 1);
{
if (!mView) {
mView = safenew KeyView(staticBox, CommandsListID);
mView = safenew KeyView(S.GetParent(), CommandsListID);
mView->SetName(_("Bindings"));
}
S.Prop(true);
@ -228,7 +228,7 @@ void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S)
S.StartThreeColumn();
{
if (!mKey) {
mKey = safenew wxTextCtrl(staticBox,
mKey = safenew wxTextCtrl(S.GetParent(),
CurrentComboID,
wxT(""),
wxDefaultPosition,