1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 14:02:57 +02:00

Fix bug in WarningDialog where dismissing via the close box made "don't show again" checkbox always stored as true, because EndModal() was called not via WarningDialog::OnOK() and the return value was 5101. So the prefs file had 5101, which is later read as "true", regardless of the actual setting of the checkbox.

Various other cleanup.
This commit is contained in:
v.audacity
2011-02-01 22:30:10 +00:00
parent dbf7942e1d
commit 39adb7b552
3 changed files with 7 additions and 5 deletions

View File

@@ -701,7 +701,7 @@ void LWSlider::Draw()
if (mOrientation == wxHORIZONTAL)
AColor::Line(*dc, mLeftX, mCenterY+1, mRightX+2, mCenterY+1);
else //vvvvv if (mStyle != DB_SLIDER) // Let the ruler do it for vertical DB_SLIDER.
else //vvv if (mStyle != DB_SLIDER) // Let the ruler do it for vertical DB_SLIDER.
AColor::Line(*dc, mCenterX+1, mTopY, mCenterX+1, mBottomY+2);
@@ -773,7 +773,7 @@ void LWSlider::Draw()
}
}
//vvvvv 20090820: Ruler doesn't align with slider correctly -- yet.
//vvv 20090820: Ruler doesn't align with slider correctly -- yet.
//if ((mOrientation == wxVERTICAL) && (mStyle == DB_SLIDER))
//{
// if (!mpRuler)
@@ -797,7 +797,7 @@ void LWSlider::Draw()
// mpRuler->SetRange(mMaxValue, mMinValue);
// mpRuler->SetFormat(Ruler::LinearDBFormat);
// }
// mpRuler->SetBounds(mLeft, mTop, mWidth, mHeightY); //vvvvv Why the magic number reqd on height to get it to line up? + 9);
// mpRuler->SetBounds(mLeft, mTop, mWidth, mHeightY); //vvv Why the magic number reqd on height to get it to line up? + 9);
// mpRuler->Draw(*dc);
//}
//else

View File

@@ -50,7 +50,9 @@ BEGIN_EVENT_TABLE(WarningDialog, wxDialog)
END_EVENT_TABLE()
WarningDialog::WarningDialog(wxWindow *parent, wxString message)
: wxDialog(parent, wxID_ANY, (wxString)_("Warning"))
: wxDialog(parent, wxID_ANY, (wxString)_("Warning"),
wxDefaultPosition, wxDefaultSize,
wxCAPTION | wxSYSTEM_MENU) // Unlike wxDEFAULT_DIALOG_STYLE, no wxCLOSE_BOX.
{
ShuttleGui S(this, eIsCreating);