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

Modified Files:
        Project.cpp 
Log Message:
Make progress dialogs block other windows

Index: Project.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v
retrieving revision 1.317
retrieving revision 1.318
diff -u -d -r1.317 -r1.318
--- Project.cpp 24 Jul 2007 10:45:34 -0000      1.317
+++ Project.cpp 28 Jul 2007 08:15:41 -0000      1.318
@@ -1535,6 +1535,14 @@
    delete mToolManager;
    mToolManager = NULL;
 
+   // Delete the progress dialogs
+   for (mProgressCurrent = 2; mProgressCurrent >= 0; mProgressCurrent--) {
+      if (mProgressDialog[mProgressCurrent]) {
+         delete mProgressDialog[mProgressCurrent];
+         mProgressDialog[mProgressCurrent] = NULL;
+      }
+   }
+
    DestroyChildren();
 
    delete mTrackFactory;
@@ -1564,14 +1572,6 @@
    //     have been deleted before this.
    mDirManager->Deref();
 
-   // Delete the progress dialogs
-   for (mProgressCurrent = 2; mProgressCurrent >= 0; mProgressCurrent--) {
-      if (mProgressDialog[mProgressCurrent]) {
-         delete mProgressDialog[mProgressCurrent];
-         mProgressDialog[mProgressCurrent] = NULL;
-      }
-   }
-
    gAudacityProjects.Remove(this);
    if (gActiveProject == this) {
       // Find a new active project
@@ -3392,17 +3392,9 @@
       mProgressDialog[mProgressCurrent] = NULL;
    }
 
-#if 0
-   wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
-   wxASSERT( traits );//"no wxAppTraits in RunInThread()?"
-   // disable all app windows while waiting for the child process to finish
-   cookie = traits->BeforeChildWaitLoop();
-#endif
-
    wxStartTimer();
    wxBeginBusyCursor();
    wxSafeYield(this, true);
-//   wxSafeYield( mProgressDialog[mProgressCurrent] );  //Only progress dialog 
active - for the cancel button?
 }
    
 void AudacityProject::ProgressHide()
@@ -3414,15 +3406,6 @@
    if (wxIsBusy()) {
       wxEndBusyCursor();
    }
-#if 0
-   if( cookie != NULL )
-   {
-      wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
-      wxASSERT( traits );//"no wxAppTraits in RunInThread()?"
-      traits->AfterChildWaitLoop(cookie);
-      cookie=NULL;
-   }
-#endif
 }
 
 bool AudacityProject::ProgressUpdate(int value, const wxString &message)
@@ -3432,7 +3415,7 @@
          new wxProgressDialog(mProgressTitle,
                               mProgressMessage,
                               1000,
-                              NULL,
+                              this,
                               wxPD_CAN_ABORT |
                               wxPD_ELAPSED_TIME |
                               wxPD_REMAINING_TIME |


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to