Update of /cvsroot/audacity/audacity-src/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19025/src
Modified Files: AudacityApp.cpp Project.cpp Log Message: This can't be tested too much, but I believe it fixes "P1 Closing any project window removes the clipboard content" without producing orphaned blockfiles or memory leaks... Instead of deleting the clipboard after all projects have closed, it is now deleted before the last project to close Deref's its DirManager. Thanks to Leland and Gale Index: Project.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v retrieving revision 1.437 retrieving revision 1.438 diff -u -d -r1.437 -r1.438 --- Project.cpp 9 Jul 2009 23:52:18 -0000 1.437 +++ Project.cpp 10 Jul 2009 17:24:00 -0000 1.438 @@ -1791,7 +1791,18 @@ mIsDeleting = true; - ClearClipboard(); + bool quitOnClose; +#ifdef __WXMAC__ + bool defaultQuitOnClose = false; +#else + bool defaultQuitOnClose = true; +#endif + gPrefs->Read(wxT("/GUI/QuitOnClose"), &quitOnClose, defaultQuitOnClose); + + // DanH: If we're definitely about to quit, delete the clipboard. + // Doing this after Deref'ing the DirManager causes problems. + if ((gAudacityProjects.GetCount() == 1) && (quitOnClose || gIsQuitting)) + DeleteClipboard(); // JKC: For Win98 and Linux do not detach the menu bar. // We want wxWindows to clean it up for us. @@ -1882,21 +1893,12 @@ } if (gAudacityProjects.IsEmpty() && !gIsQuitting) { - bool quitOnClose; // LL: On the Mac, we don't want the logger open after all projects // have been closed since it's menu will show instead of the // common menu. wxGetApp().mLogger->Show(false); -#ifdef __WXMAC__ - bool defaultQuitOnClose = false; -#else - bool defaultQuitOnClose = true; -#endif - - gPrefs->Read(wxT("/GUI/QuitOnClose"), &quitOnClose, defaultQuitOnClose); - if (quitOnClose) QuitAudacity(); else { Index: AudacityApp.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/AudacityApp.cpp,v retrieving revision 1.238 retrieving revision 1.239 diff -u -d -r1.238 -r1.239 --- AudacityApp.cpp 6 Jul 2009 00:52:07 -0000 1.238 +++ AudacityApp.cpp 10 Jul 2009 17:24:00 -0000 1.239 @@ -301,9 +301,6 @@ //temporarilly commented out till it is added to all projects //delete Profiler::Instance(); - //Delete the clipboard - AudacityProject::DeleteClipboard(); - //delete the static lock for audacity projects AudacityProject::DeleteAllProjectsDeleteLock(); ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs