Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2058

Modified Files:
        Project.cpp 
Log Message:
correcting status bar text for on demand completion of tasks.  Also fixing PC 
display order to ensure complete message gets displayed on end.


Index: Project.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v
retrieving revision 1.458
retrieving revision 1.459
diff -u -d -r1.458 -r1.459
--- Project.cpp 10 Oct 2009 08:22:07 -0000      1.458
+++ Project.cpp 10 Oct 2009 14:44:25 -0000      1.459
@@ -1541,11 +1541,7 @@
 {
   if(mTrackPanel)
       mTrackPanel->Refresh(false);
- 
-   wxString msg;
-   msg.Printf(_("on-demand import complete."));
-   mStatusBar->SetStatusText(msg);
-}
+ }
 
 void AudacityProject::OnScroll(wxScrollEvent & event)
 {
@@ -3740,12 +3736,28 @@
       if(numTasks)
       {
          wxString msg;
-         if(numTasks>1)
+         float ratioComplete= 
ODManager::Instance()->GetOverallPercentComplete();
+
+         if(ratioComplete>=1.0f)
+         {
+            //if we are 100 percent complete and there is still a task in the 
queue, we should wake the ODManager
+            //so it can clear it.
+            //signal the od task queue loop to wake up so it can remove the 
tasks from the queue and the queue if it is empty.
+            ODManager::Instance()->SignalTaskQueueLoop();
+
+            
+            msg.Printf(_("On-demand import and waveform calculation 
complete."));
+            mStatusBar->SetStatusText(msg);
+
+         }
+         else if(numTasks>1)
             msg.Printf(_("Import(s) complete. Running %d on-demand waveform 
calculations. Overall %2.0f%% complete."),
-              
numTasks,ODManager::Instance()->GetOverallPercentComplete()*100.0);       
+              numTasks,ratioComplete*100.0);       
          else
             msg.Printf(_("Import complete. Running an on-demand waveform 
calculation. %2.0f%% complete."),
-             ODManager::Instance()->GetOverallPercentComplete()*100.0);    
+             ratioComplete*100.0);    
+             
+
          mStatusBar->SetStatusText(msg);
       }
    }


------------------------------------------------------------------------------
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

Reply via email to