mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-22 14:32:58 +02:00
Script work
Add Envelope script Add Clips and Boundaries Scripts. Add docimages_oddments.py for the weirder cases. Add make html script. Add more spectral images Add Dark versions of spectrograms (paul's comment) Clean up oddments script. - This commit also adds an option NOT to bring Audacity to the top when screenshotting. -- That's because QuickPlay will disappear if you do -because you lose mouse capture. - Also allow negative window IDs in the drag command. - Registration names of align commands sorted. They had &, : and / in them. - Fixed bug in SetTrackInfo where bFocused was being ignored - Fixed bug where command manager ignored multi-commands. - Commit docimages_oddments.py again, to fix line endings.
This commit is contained in:
committed by
Paul Licameli
parent
4724c6a131
commit
fa49d94530
@@ -77,10 +77,27 @@ static const wxString kScaleTypeStrings[nScaleTypes] =
|
||||
};
|
||||
|
||||
|
||||
enum kZoomTypes
|
||||
{
|
||||
kReset,
|
||||
kTimes2,
|
||||
kHalfWave,
|
||||
nZoomTypes
|
||||
};
|
||||
|
||||
static const wxString kZoomTypeStrings[nZoomTypes] =
|
||||
{
|
||||
XO("Reset"),
|
||||
XO("Times2"),
|
||||
XO("HalfWave"),
|
||||
};
|
||||
|
||||
|
||||
bool SetTrackCommand::DefineParams( ShuttleParams & S ){
|
||||
wxArrayString colours( nColours, kColourStrings );
|
||||
wxArrayString displays( nDisplayTypes, kDisplayTypeStrings );
|
||||
wxArrayString scales( nScaleTypes, kScaleTypeStrings );
|
||||
wxArrayString vzooms( nZoomTypes, kZoomTypeStrings );
|
||||
|
||||
S.OptionalY( bHasTrackIndex ).Define( mTrackIndex, wxT("Track"), 0, 0, 100 );
|
||||
S.OptionalN( bHasChannelIndex ).Define( mChannelIndex, wxT("Channel"), 0, 0, 100 );
|
||||
@@ -92,6 +109,7 @@ bool SetTrackCommand::DefineParams( ShuttleParams & S ){
|
||||
S.OptionalN( bHasScaleType ).DefineEnum( mScaleType, wxT("Scale"), kLinear, scales );
|
||||
S.OptionalN( bHasColour ).DefineEnum( mColour, wxT("Color"), kColour0, colours );
|
||||
S.OptionalN( bHasUseSpecPrefs ).Define( bUseSpecPrefs, wxT("SpecPrefs"), false );
|
||||
S.OptionalN( bHasVZoom ).DefineEnum( mVZoom, wxT("VZoom"), kReset, vzooms );
|
||||
|
||||
S.OptionalN( bHasSpectralSelect ).Define( bSpectralSelect, wxT("SpectralSel"),true );
|
||||
S.OptionalN( bHasGrayScale ).Define( bGrayScale, wxT("GrayScale"), false );
|
||||
@@ -108,6 +126,7 @@ void SetTrackCommand::PopulateOrExchange(ShuttleGui & S)
|
||||
wxArrayString colours( nColours, kColourStrings );
|
||||
wxArrayString displays( nDisplayTypes, kDisplayTypeStrings );
|
||||
wxArrayString scales( nScaleTypes, kScaleTypeStrings );
|
||||
wxArrayString vzooms( nZoomTypes, kZoomTypeStrings );
|
||||
|
||||
S.AddSpace(0, 5);
|
||||
|
||||
@@ -122,6 +141,7 @@ void SetTrackCommand::PopulateOrExchange(ShuttleGui & S)
|
||||
S.Optional( bHasColour ).TieChoice( _("Colour:"), mColour, &colours );
|
||||
S.Optional( bHasDisplayType ).TieChoice( _("Display:"), mDisplayType, &displays );
|
||||
S.Optional( bHasScaleType ).TieChoice( _("Scale:"), mScaleType, &scales );
|
||||
S.Optional( bHasVZoom ).TieChoice( _("VZoom:"), mVZoom, &vzooms );
|
||||
}
|
||||
S.EndMultiColumn();
|
||||
S.StartMultiColumn(2, wxALIGN_CENTER);
|
||||
@@ -188,11 +208,19 @@ bool SetTrackCommand::Apply(const CommandContext & context)
|
||||
wt->GetSpectrogramSettings().spectralSelection = bSpectralSelect;
|
||||
if( wt && bHasGrayScale )
|
||||
wt->GetSpectrogramSettings().isGrayscale = bGrayScale;
|
||||
if( wt && bHasVZoom ){
|
||||
switch( mVZoom ){
|
||||
default:
|
||||
case kReset: wt->SetDisplayBounds(-1,1); break;
|
||||
case kTimes2: wt->SetDisplayBounds(-2,2); break;
|
||||
case kHalfWave: wt->SetDisplayBounds(0,1); break;
|
||||
}
|
||||
}
|
||||
// These ones don't make sense on the second channel of a stereo track.
|
||||
if( !bIsSecondChannel ){
|
||||
if( bHasSelected )
|
||||
t->SetSelected(bSelected);
|
||||
if( bHasFocused )
|
||||
if( bHasFocused && bFocused)
|
||||
{
|
||||
TrackPanel *panel = context.GetProject()->GetTrackPanel();
|
||||
panel->SetFocusedTrack( t );
|
||||
|
Reference in New Issue
Block a user