Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13494
Modified Files:
FreqWindow.cpp FreqWindow.h
Log Message:
Keep setting in prefs. Use new (generalised) DrawGrid modifications. Control
needs to be added for mDrawGrid.
Index: FreqWindow.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/FreqWindow.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- FreqWindow.h 20 Feb 2009 01:04:39 -0000 1.11
+++ FreqWindow.h 24 Feb 2009 00:02:14 -0000 1.12
@@ -81,6 +81,11 @@
private:
float *buffer;
+ bool mDrawGrid;
+ int mSize;
+ int mAlg;
+ int mFunc;
+ int mAxis;
#ifdef __WXMSW__
static const int fontSize = 8;
Index: FreqWindow.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/FreqWindow.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- FreqWindow.cpp 20 Feb 2009 01:40:46 -0000 1.63
+++ FreqWindow.cpp 24 Feb 2009 00:02:14 -0000 1.64
@@ -143,6 +143,12 @@
mLeftMargin = 40;
mBottomMargin = 20;
+ gPrefs->Read(wxT("/FreqWindow/DrawGrid"), &mDrawGrid, true);
+ gPrefs->Read(wxT("/FreqWindow/SizeChoice"), &mSize, 2);
+ gPrefs->Read(wxT("/FreqWindow/AlgChoice"), &mAlg, 0);
+ gPrefs->Read(wxT("/FreqWindow/FuncChoice"), &mFunc, 3);
+ gPrefs->Read(wxT("/FreqWindow/AxisChoice"), &mAxis, 0);
+
mFreqPlot = new FreqPlot(this, 0,
wxDefaultPosition, wxDefaultSize);
@@ -163,7 +169,7 @@
5, algChoiceStrings);
mAlgChoice->SetName(_("Algorithm"));
- mAlgChoice->SetSelection(0);
+ mAlgChoice->SetSelection(mAlg);
wxString sizeChoiceStrings[8] = { wxT("128"),
wxT("256"),
@@ -182,7 +188,7 @@
8, sizeChoiceStrings);
mSizeChoice->SetName(_("Size"));
- mSizeChoice->SetSelection(2);
+ mSizeChoice->SetSelection(mSize);
int f = NumWindowFuncs();
@@ -200,7 +206,7 @@
f, funcChoiceStrings);
mFuncChoice->SetName(_("Function"));
- mFuncChoice->SetSelection(3);
+ mFuncChoice->SetSelection(mFunc);
delete[]funcChoiceStrings;
wxString axisChoiceStrings[2] = { _("Linear frequency"),
@@ -214,7 +220,7 @@
2, axisChoiceStrings);
mAxisChoice->SetName(_("Axis"));
- mAxisChoice->SetSelection(0);
+ mAxisChoice->SetSelection(mAxis);
mLogAxis = false;
@@ -583,8 +589,11 @@
memDC.SetBrush(*wxTRANSPARENT_BRUSH);
memDC.DrawRectangle(r);
- hRuler->ruler.DrawGrid(memDC, r.height);
- vRuler->ruler.DrawGrid(memDC, r.width);
+ if(mDrawGrid)
+ {
+ hRuler->ruler.DrawGrid(memDC, r.height, true, true, 1, 1);
+ vRuler->ruler.DrawGrid(memDC, r.width, true, true, 1, 1);
+ }
memDC.SelectObject( wxNullBitmap );
@@ -903,6 +912,11 @@
void FreqWindow::OnCloseButton(wxCommandEvent & WXUNUSED(event))
{
+ gPrefs->Write(wxT("/FreqWindow/DrawGrid"), mDrawGrid);
+ gPrefs->Write(wxT("/FreqWindow/SizeChoice"), mSizeChoice->GetSelection());
+ gPrefs->Write(wxT("/FreqWindow/AlgChoice"), mAlgChoice->GetSelection());
+ gPrefs->Write(wxT("/FreqWindow/FuncChoice"), mFuncChoice->GetSelection());
+ gPrefs->Write(wxT("/FreqWindow/AxisChoice"), mAxisChoice->GetSelection());
this->Show(FALSE);
}
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs