Update of /cvsroot/audacity/audacity-src/src In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4134
Modified Files: Menus.cpp TimerRecordDialog.cpp TimerRecordDialog.h Log Message: Possible fix for P2 Timer Record doesn't let user cancel (mac only) Index: TimerRecordDialog.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/TimerRecordDialog.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TimerRecordDialog.h 2 Feb 2009 17:11:04 -0000 1.3 +++ TimerRecordDialog.h 19 Dec 2009 18:31:32 -0000 1.4 @@ -31,6 +31,8 @@ ~TimerRecordDialog(); void OnTimer(wxTimerEvent& event); + ///Runs the wait for start dialog. Returns false if the user clicks stop. + bool RunWaitDialog(); private: void OnDatePicker_Start(wxDateEvent& event); Index: TimerRecordDialog.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/TimerRecordDialog.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- TimerRecordDialog.cpp 23 Oct 2009 18:10:52 -0000 1.17 +++ TimerRecordDialog.cpp 19 Dec 2009 18:31:32 -0000 1.18 @@ -208,7 +208,13 @@ } m_timer.Stop(); // Don't need to keep updating m_DateTime_Start to prevent backdating. + this->EndModal(wxID_OK); +} +///Runs the wait for start dialog. Returns false if the user clicks stop while we are recording +///so that the high +bool TimerRecordDialog::RunWaitDialog() +{ int updateResult = eProgressSuccess; if (m_DateTime_Start > wxDateTime::UNow()) updateResult = this->WaitForStart(); @@ -216,8 +222,7 @@ if (updateResult != eProgressSuccess) { // Don't proceed, but don't treat it as canceled recording. User just canceled waiting. - this->EndModal(wxID_CANCEL); - return; + return true; } else { @@ -253,9 +258,8 @@ } // Let the caller handle cancellation or failure from recording progress. if (updateResult == eProgressCancelled || updateResult == eProgressFailed) - this->EndModal(updateResult); - else - this->EndModal(wxID_OK); + return false; + return true; } wxString TimerRecordDialog::GetDisplayDate( wxDateTime & dt ) Index: Menus.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v retrieving revision 1.539 retrieving revision 1.540 diff -u -d -r1.539 -r1.540 --- Menus.cpp 4 Dec 2009 03:24:59 -0000 1.539 +++ Menus.cpp 19 Dec 2009 18:31:32 -0000 1.540 @@ -4982,11 +4982,20 @@ void AudacityProject::OnTimerRecord() { + //we break the prompting and waiting dialogs into two sections + //because they both give the user a chance to click cancel + //and therefore remove the newly inserted track. + TimerRecordDialog dialog(this /* parent */ ); int modalResult = dialog.ShowModal(); - if (modalResult == eProgressCancelled) + if (modalResult == wxID_CANCEL) { - // Cancelled while the recording, so throw out the fresh track. + // Cancelled before recording - don't need to do anyting. + } + else if(!dialog.RunWaitDialog()) + { + //show th e "wait for start dialog + //Possibly cancelled while the recording, so throw out the fresh track. OnUndo(); } } ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs