Update of /cvsroot/audacity/audacity-src/src/commands In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26080/src/commands
Modified Files: BatchEvalCommand.cpp Log Message: Fix (I hope) for P2 "Chains: EQ applies parameters last used via Effect menu instead of those stored in chain." Remembered settings should now be largely separate for the batch-chain and effect-menu uses of EQ. When editing parameters for an effect in a chain, the parameters dialog now has the command selection dialog as its parent (rather than NULL). This means it appears on top & centered properly, and also allows the EQ effect to detect whether it is being edited as part of a chain (little bit of a hack). If part of a chain, the EQ dialog checks whether the custom curve was selected when OK was pressed - if so, a message is displayed which explains that the curve must have a distinct name in order to be used in a batch chain. To speed up testing, I also added a 'ChainName' parameter to BatchEvalCommand so that saved chains can be used from a script. (Not likely to be used much as the script can do everything the chains do, but it doesn't hurt). Index: BatchEvalCommand.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/commands/BatchEvalCommand.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- BatchEvalCommand.cpp 4 Aug 2009 04:19:22 -0000 1.2 +++ BatchEvalCommand.cpp 7 Aug 2009 15:32:57 -0000 1.3 @@ -26,6 +26,8 @@ signature.AddParameter(wxT("CommandName"), wxT(""), commandNameValidator); Validator *paramValidator(new Validator()); signature.AddParameter(wxT("ParamString"), wxT(""), paramValidator); + Validator *chainValidator(new Validator()); + signature.AddParameter(wxT("ChainName"), wxT(""), chainValidator); } Command *BatchEvalCommandType::Create(CommandOutputTarget *target) @@ -35,6 +37,15 @@ bool BatchEvalCommand::Apply(CommandExecutionContext context) { + + wxString chainName = GetString(wxT("ChainName")); + if (chainName != wxT("")) + { + BatchCommands batch; + batch.ReadChain(chainName); + return batch.ApplyChain(); + } + wxString cmdName = GetString(wxT("CommandName")); wxString cmdParams = GetString(wxT("ParamString")); ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs