Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv13980

Modified Files:
      Tag: Audacity_UmixIt
        Menus.cpp Project.cpp 
Log Message:
<import> tag

Index: Project.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v
retrieving revision 1.178.2.17.2.2
retrieving revision 1.178.2.17.2.3
diff -u -d -r1.178.2.17.2.2 -r1.178.2.17.2.3
--- Project.cpp 23 Nov 2006 03:48:09 -0000      1.178.2.17.2.2
+++ Project.cpp 27 Nov 2006 06:21:59 -0000      1.178.2.17.2.3
@@ -159,6 +159,7 @@
 {
    for (int i = 0; i < filenames.GetCount(); i++)
       mProject->Import(filenames[i]);
+   mProject->HandleResize(); // Adjust scrollers for new track sizes.
    return true;
 }
 
@@ -166,9 +167,9 @@
 {
    if (strcmp(tag, "import") || strcmp(*attrs++, "filename")) return false;
    wxString strPathname = *attrs;
-   if (!wxFile::Exists(strPathname)) {
+   if (!wxFile::Exists(FILENAME(strPathname))) {
       strPathname = mProject->GetDirManager()->GetProjectDataDir() + "\\" + 
strPathname;
-      if (!wxFile::Exists(strPathname)) return false;
+      if (!wxFile::Exists(FILENAME(strPathname))) return false;
    }
    mProject->Import(strPathname);
    return true; //vvv UmixIt   result from Import?
@@ -2317,7 +2318,8 @@
       SetTitle(GetName());
    }
 
-   HandleResize();   
+   // Moved this call to higher levels to prevent horrible flicker redrawing 
everything on each file.
+   //   HandleResize();
 }
 
 void AudacityProject::Import(wxString fileName)
@@ -2431,7 +2433,8 @@
 
 void AudacityProject::InitialState()
 {
-   if (mImportXMLTagHandler != NULL) { //vvv UmixIt   Just keep it dirty, or 
auto-save?
+   if (mImportXMLTagHandler != NULL) {
+      // We processed an <import> tag, so save it as a normal project, with no 
<import> tags.
       this->Save();
    }
    
@@ -2518,12 +2521,6 @@
 
 void AudacityProject::UpdateLyrics()
 {
-   if (mLyricsWindow == NULL) {
-      mLyricsWindow = new LyricsWindow(this);
-      wxASSERT(mLyricsWindow);
-      mLyricsWindow->Show(true);
-   }
-
    LabelTrack *labelTrack = NULL;
    Track *t;
    TrackListIterator iter(mTracks);
@@ -2539,6 +2536,12 @@
    if (!labelTrack)
       return;
 
+   if (mLyricsWindow == NULL) {
+      mLyricsWindow = new LyricsWindow(this);
+      wxASSERT(mLyricsWindow);
+      mLyricsWindow->Show(true);
+   }
+
    Lyrics *lyrics = mLyricsWindow->GetLyricsPanel();
    lyrics->Clear();
    for(int i=0; i<labelTrack->GetNumLabels(); i++) {

Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.151.2.26.2.1
retrieving revision 1.151.2.26.2.2
diff -u -d -r1.151.2.26.2.1 -r1.151.2.26.2.2
--- Menus.cpp   15 Nov 2006 22:32:13 -0000      1.151.2.26.2.1
+++ Menus.cpp   27 Nov 2006 06:21:58 -0000      1.151.2.26.2.2
@@ -2630,6 +2630,7 @@
       
       Import(fileName);
    }
+   HandleResize(); // Adjust scrollers for new track sizes.
 }
 
 void AudacityProject::OnImportLabels()
@@ -2753,6 +2754,7 @@
       return;
 
    AddImportedTracks(fileName, newTracks, numTracks);
+   HandleResize(); // Adjust scrollers for new track sizes.
 }
 
 void AudacityProject::OnEditID3()


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to