Update of /cvsroot/audacity/audacity-src/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2459
Modified Files: Project.cpp Log Message: Apply fix to Ed Musgrove's patch for hidden windows so that GetNextWindowPlacement () counts backwards. Index: Project.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v retrieving revision 1.457 retrieving revision 1.458 diff -u -d -r1.457 -r1.458 --- Project.cpp 7 Oct 2009 23:31:41 -0000 1.457 +++ Project.cpp 10 Oct 2009 08:22:07 -0000 1.458 @@ -558,17 +558,18 @@ gPrefs->Read(wxT("/Window/Maximized"), bMaximized); } else { - //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 + //efm5 28 September 2009 bool validWindowSize = FALSE; AudacityProject * validProject = NULL; size_t numProjects = gAudacityProjects.Count(); - for (size_t i = 0; i < numProjects; i++) + for (int i = numProjects; i > 0 ; i--) + // read these backwards so that new project locations will increment off the newest project window { - if (!gAudacityProjects[i]->IsIconized()) { - validWindowSize = TRUE; - validProject = gAudacityProjects[i]; - i = numProjects; + if (!gAudacityProjects[i-1]->IsIconized()) { + validWindowSize = TRUE; + validProject = gAudacityProjects[i-1]; + i = 0; } } if (validWindowSize) @@ -578,13 +579,14 @@ } else { - GetDefaultWindowRect(&defWndRect); - nextRect->SetX(gPrefs->Read(wxT("/Window/X"), defWndRect.GetX())); - nextRect->SetY(gPrefs->Read(wxT("/Window/Y"), defWndRect.GetY())); - nextRect->SetWidth(gPrefs->Read(wxT("/Window/Width"), defWndRect.GetWidth())); - nextRect->SetHeight(gPrefs->Read(wxT("/Window/Height"), defWndRect.GetHeight())); - gPrefs->Read(wxT("/Window/Maximized"), bMaximized); + GetDefaultWindowRect(&defWndRect); + nextRect->SetX(gPrefs->Read(wxT("/Window/X"), defWndRect.GetX())); + nextRect->SetY(gPrefs->Read(wxT("/Window/Y"), defWndRect.GetY())); + nextRect->SetWidth(gPrefs->Read(wxT("/Window/Width"), defWndRect.GetWidth())); + nextRect->SetHeight(gPrefs->Read(wxT("/Window/Height"), defWndRect.GetHeight())); + gPrefs->Read(wxT("/Window/Maximized"), bMaximized); } + //Placement depends on the increments nextRect->x += inc; nextRect->y += inc; @@ -1828,10 +1830,10 @@ // LL: Save before doing anything else to the window that might make // its size change. //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 - SaveWindowSize(); + // the initial opening window invisible. + //This SaveWindowSize call was modified to deal with iconized project windows + //efm5 28 September 2009 + SaveWindowSize(); mLastFocusedWindow = NULL; mIsDeleting = 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