Update of /cvsroot/audacity/audacity-src/src In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv27516/src
Modified Files: AudacityApp.cpp AudacityApp.h Menus.cpp Project.cpp Project.h Log Message: Fixed the logger (moved it into AudacityApp). Now it won't break when opening multiple projects. Index: Project.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Project.h,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 --- Project.h 4 Jun 2008 19:10:44 -0000 1.132 +++ Project.h 7 Jun 2008 17:48:22 -0000 1.133 @@ -107,8 +107,6 @@ virtual ~ AudacityProject(); - wxLogWindow *mLogger; - TrackList *GetTracks() { return mTracks; }; UndoManager *GetUndoManager() { return &mUndoManager; } Index: Project.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v retrieving revision 1.355 retrieving revision 1.356 diff -u -d -r1.355 -r1.356 --- Project.cpp 2 Jun 2008 14:47:41 -0000 1.355 +++ Project.cpp 7 Jun 2008 17:48:22 -0000 1.356 @@ -534,11 +534,6 @@ mRecordingRecoveryHandler(NULL), mImportedDependencies(false) { - mLogger = new wxLogWindow(NULL,wxT("Debug log"), false, false); - mLogger->SetActiveTarget(mLogger); - mLogger->EnableLogging(true); - mLogger->SetLogLevel(wxLOG_Max); - int widths[] = {-1, 130}; mStatusBar = CreateStatusBar(2); @@ -1631,14 +1626,6 @@ } } - if (mLogger) - { - mLogger->SetLogLevel(0); - mLogger->EnableLogging(false); - mLogger->SetActiveTarget(NULL); - delete mLogger; - } - Destroy(); } Index: Menus.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v retrieving revision 1.376 retrieving revision 1.377 diff -u -d -r1.376 -r1.377 --- Menus.cpp 5 Jun 2008 09:50:29 -0000 1.376 +++ Menus.cpp 7 Jun 2008 17:48:21 -0000 1.377 @@ -4491,7 +4491,7 @@ void AudacityProject::OnLog() { - if (mLogger) mLogger->Show(); + wxGetApp().mLogger->Show(); } void AudacityProject::OnBenchmark() Index: AudacityApp.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/AudacityApp.cpp,v retrieving revision 1.195 retrieving revision 1.196 diff -u -d -r1.195 -r1.196 --- AudacityApp.cpp 1 Jun 2008 16:16:43 -0000 1.195 +++ AudacityApp.cpp 7 Jun 2008 17:48:21 -0000 1.196 @@ -262,6 +262,9 @@ //Delete the clipboard AudacityProject::DeleteClipboard(); + wxGetApp().mLogger->SetActiveTarget(NULL); + delete wxGetApp().mLogger; + if (bForce) { wxExit(); @@ -928,6 +931,11 @@ #endif // __CYGWIN__ (Cygwin command-line parser) + mLogger = new wxLogWindow(NULL,wxT("Debug log"),false,false); + mLogger->SetActiveTarget(mLogger); + mLogger->EnableLogging(true); + mLogger->SetLogLevel(wxLOG_Max); + gInited = true; return TRUE; Index: AudacityApp.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/AudacityApp.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- AudacityApp.h 23 May 2008 05:54:00 -0000 1.42 +++ AudacityApp.h 7 Jun 2008 17:48:21 -0000 1.43 @@ -143,6 +143,8 @@ wxArrayString &results); Importer *mImporter; + + wxLogWindow *mLogger; private: wxLocale *mLocale; ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs