Update of /cvsroot/audacity/audacity-src/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4904/src
Modified Files: AudacityApp.cpp FreqWindow.cpp FreqWindow.h Menus.cpp Project.cpp Project.h Log Message: Make plot window a child of project so that plots from other projects don't overlay active project...except on the Mac. Should fix this problem: 1 Generate > Tone 2 Analyze > Plot Spectrum 3 File > New (note tone plot is in the way, move it down) 4 Generate > Noise 5 Analyze > Plot Spectrum 6 Noise plot comes on top and obscures the tone plot 7 Switch back to window with tone, and noise plot still shows 8 Drag noise plot down and tone plot is underneath Index: Project.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Project.h,v retrieving revision 1.166 retrieving revision 1.167 diff -u -d -r1.166 -r1.167 --- Project.h 12 Sep 2009 06:05:41 -0000 1.166 +++ Project.h 20 Sep 2009 19:06:06 -0000 1.167 @@ -364,8 +364,6 @@ void PushState(wxString desc, wxString shortDesc, bool consolidate = false); - FreqWindow *mFreqWindow; - private: void ClearClipboard(); @@ -459,6 +457,7 @@ MixerBoardFrame* mMixerBoardFrame; #endif + FreqWindow *mFreqWindow; public: ToolManager *mToolManager; Index: FreqWindow.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/FreqWindow.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- FreqWindow.h 30 Jul 2009 12:39:29 -0000 1.19 +++ FreqWindow.h 20 Sep 2009 19:06:04 -0000 1.20 @@ -32,8 +32,6 @@ class TrackList; -void InitFreqWindow(wxWindow * parent); - class FreqWindow; class FreqPlot:public wxWindow { Index: AudacityApp.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/AudacityApp.cpp,v retrieving revision 1.247 retrieving revision 1.248 diff -u -d -r1.247 -r1.248 --- AudacityApp.cpp 18 Sep 2009 20:25:18 -0000 1.247 +++ AudacityApp.cpp 20 Sep 2009 19:06:04 -0000 1.248 @@ -68,7 +68,6 @@ #include "effects/VST/VSTEffect.h" #include "FFmpeg.h" #include "GStreamerLoader.h" -#include "FreqWindow.h" #include "Internat.h" #include "LangChoice.h" #include "Prefs.h" Index: FreqWindow.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/FreqWindow.cpp,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- FreqWindow.cpp 21 Aug 2009 19:13:38 -0000 1.79 +++ FreqWindow.cpp 20 Sep 2009 19:06:04 -0000 1.80 @@ -93,28 +93,6 @@ #define FREQ_WINDOW_WIDTH 480 #define FREQ_WINDOW_HEIGHT 330 -void InitFreqWindow(wxWindow * parent) -{ - AudacityProject* p = GetActiveProject(); - if (!p) - return; - - if(!p->mFreqWindow) - { - wxPoint where; - - where.x = 150; - where.y = 150; - - p->mFreqWindow = new FreqWindow(parent, -1, _("Frequency Analysis"), where); - } - wxCommandEvent dummy; - p->mFreqWindow->OnReplot(dummy); - p->mFreqWindow->Show(true); - p->mFreqWindow->Raise(); - p->mFreqWindow->SetFocus(); -} - // FreqWindow BEGIN_EVENT_TABLE(FreqWindow, wxDialog) @@ -134,7 +112,7 @@ const wxString & title, const wxPoint & pos): wxDialog(parent, id, title, pos, wxDefaultSize, - wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX ), + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX), mData(NULL), mProcessed(NULL), mBitmap(NULL) { mMouseX = 0; @@ -1270,9 +1248,7 @@ if(dBRange < 90.) dBRange = 90.; GetAudio(); - - if(p->mFreqWindow) - p->mFreqWindow->Plot(); + Plot(); } void FreqWindow::OnGridOnOff(wxCommandEvent & WXUNUSED(event)) @@ -1281,9 +1257,7 @@ mDrawGrid = true; else mDrawGrid = false; - - if(p->mFreqWindow) - p->mFreqWindow->Plot(); + Plot(); } BEGIN_EVENT_TABLE(FreqPlot, wxWindow) Index: Menus.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v retrieving revision 1.526 retrieving revision 1.527 diff -u -d -r1.526 -r1.527 --- Menus.cpp 19 Sep 2009 09:24:15 -0000 1.526 +++ Menus.cpp 20 Sep 2009 19:06:04 -0000 1.527 @@ -71,7 +71,6 @@ #endif #include "Internat.h" #include "FileFormats.h" -#include "FreqWindow.h" #include "LoadModules.h" #include "Prefs.h" #include "Printing.h" @@ -4235,7 +4234,20 @@ void AudacityProject::OnPlotSpectrum() { - InitFreqWindow(NULL); + if (!mFreqWindow) { + wxPoint where; + + where.x = 150; + where.y = 150; + + mFreqWindow = new FreqWindow(this, -1, _("Frequency Analysis"), where); + } + + wxCommandEvent dummy; + mFreqWindow->OnReplot(dummy); + mFreqWindow->Show(true); + mFreqWindow->Raise(); + mFreqWindow->SetFocus(); } void AudacityProject::OnContrast() Index: Project.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v retrieving revision 1.454 retrieving revision 1.455 diff -u -d -r1.454 -r1.455 --- Project.cpp 19 Sep 2009 00:03:57 -0000 1.454 +++ Project.cpp 20 Sep 2009 19:06:06 -0000 1.455 @@ -95,7 +95,6 @@ #include "AColor.h" #include "AudioIO.h" #include "Dependencies.h" -#include "FreqWindow.h" #include "HistoryWindow.h" #ifdef EXPERIMENTAL_LYRICS_WINDOW #include "Lyrics.h" ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs