Update of /cvsroot/audacity/audacity-src/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31494
Modified Files: AudacityApp.cpp AudacityApp.h Project.cpp Log Message: Patch from Ed Musgrove to address window size/location not saved to .cfg after unchecking and rechecking "Closing last window quits Audacity". Index: Project.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v retrieving revision 1.462 retrieving revision 1.463 diff -u -d -r1.462 -r1.463 --- Project.cpp 14 Oct 2009 21:48:10 -0000 1.462 +++ Project.cpp 15 Oct 2009 19:56:52 -0000 1.463 @@ -560,7 +560,7 @@ } else { //This code was heavily modified to deal with iconized project windows - //efm5 28 September 2009 + //Ed Musgrove 28 September 2009 bool validWindowSize = FALSE; AudacityProject * validProject = NULL; size_t numProjects = gAudacityProjects.Count(); @@ -1829,7 +1829,7 @@ //This is to repair the potential situation in which Audacity opens with // the initial opening window invisible. //This SaveWindowSize call was modified to deal with iconized project windows - //efm5 28 September 2009 + //Ed Musgrove 28 September 2009 SaveWindowSize(); mLastFocusedWindow = NULL; @@ -1947,7 +1947,11 @@ QuitAudacity(); else { #if !defined(__WXMAC__) - CreateNewAudacityProject(); + // we want to use this new Audacity project from which to gather preference data + // Ed Musgrove + // 11 October 2009 + wxGetApp().SetWindowRectAlreadySaved(FALSE); + CreateNewAudacityProject(); #endif } } Index: AudacityApp.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/AudacityApp.h,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- AudacityApp.h 15 Aug 2009 12:09:48 -0000 1.58 +++ AudacityApp.h 15 Oct 2009 19:56:50 -0000 1.59 @@ -164,6 +164,11 @@ FileHistory *GetRecentFiles() {return mRecentFiles;} void AddFileToHistory(const wxString & name); + // Use these to access the new mmWindowRectAlreadySaved Boolean . + // Ed Musgrove + // 11 October 2009 + bool GetWindowRectAlreadySaved()const {return mWindowRectAlreadySaved;} + void SetWindowRectAlreadySaved(bool alreadySaved) {mWindowRectAlreadySaved = alreadySaved;} Importer *mImporter; @@ -199,6 +204,11 @@ // .... depends on whether [AudacityDir]\presets can be written wxString mAppHomeDir; wxString mPresetsDir; + // Use this new Boolean to determine if the project window + // location and size have already been written to preferences. + // Ed Musgrove + // 11 October 2009 + bool mWindowRectAlreadySaved; #if defined(__WXMSW__) IPCServ *mIPCServ; Index: AudacityApp.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/AudacityApp.cpp,v retrieving revision 1.249 retrieving revision 1.250 diff -u -d -r1.249 -r1.250 --- AudacityApp.cpp 30 Sep 2009 19:31:43 -0000 1.249 +++ AudacityApp.cpp 15 Oct 2009 19:56:48 -0000 1.250 @@ -244,8 +244,9 @@ else /*end+*/ { - //This SaveWindowSize call was heavily modified to deal with iconized project windows - //efm5 28 September 2009 + // This SaveWindowSize call was heavily modified to deal with iconized project windows + // Ed Musgrove + // 28 September 2009 SaveWindowSize(); while (gAudacityProjects.Count()) { @@ -303,17 +304,12 @@ QuitAudacity(false); } - -//Use this new static Boolean to determine if the project window -// location and size have already been written to preferences. -//efm5 28 September 2009 -static bool windowRectAlreadySaved = FALSE; - void SaveWindowSize() - //This code was heavily modified to deal with iconized project windows. - //efm5 28 September 2009 + // This code was heavily modified to deal with iconized project windows. + // Ed Musgrove + // 28 September 2009 { - if (windowRectAlreadySaved) + if (wxGetApp().GetWindowRectAlreadySaved()) { return; } @@ -348,7 +344,7 @@ gPrefs->Write(wxT("/Window/Height"), defWndRect.GetHeight()); gPrefs->Write(wxT("/Window/Maximized"), FALSE); } - windowRectAlreadySaved = TRUE; + wxGetApp().SetWindowRectAlreadySaved(TRUE); } #if defined(__WXGTK__) && defined(HAVE_GTK) @@ -1239,6 +1235,11 @@ ModuleManager::Dispatch(AppInitialized); + // initialize mWindowRectAlreadySaved + // Ed Musgrove + // 11 October 2009 + mWindowRectAlreadySaved = FALSE; + return TRUE; } ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) 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/devconference _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs