mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
Each command class registers itself
This commit is contained in:
@@ -36,6 +36,7 @@ SetTrackAudioCommand and SetTrackVisualsCommand.
|
||||
#include "../Audacity.h"
|
||||
#include "SetTrackInfoCommand.h"
|
||||
|
||||
#include "LoadCommands.h"
|
||||
#include "../Project.h"
|
||||
#include "../TrackPanelAx.h"
|
||||
#include "../TrackPanel.h"
|
||||
@@ -124,6 +125,8 @@ bool SetTrackBase::Apply(const CommandContext & context )
|
||||
const ComponentInterfaceSymbol SetTrackStatusCommand::Symbol
|
||||
{ XO("Set Track Status") };
|
||||
|
||||
namespace{ BuiltinCommandsModule::Registration< SetTrackStatusCommand > reg; }
|
||||
|
||||
bool SetTrackStatusCommand::DefineParams( ShuttleParams & S ){
|
||||
SetTrackBase::DefineParams( S );
|
||||
S.OptionalN( bHasTrackName ).Define( mTrackName, wxT("Name"), _("Unnamed") );
|
||||
@@ -184,6 +187,8 @@ bool SetTrackStatusCommand::ApplyInner(const CommandContext & context, Track * t
|
||||
const ComponentInterfaceSymbol SetTrackAudioCommand::Symbol
|
||||
{ XO("Set Track Audio") };
|
||||
|
||||
namespace{ BuiltinCommandsModule::Registration< SetTrackAudioCommand > reg2; }
|
||||
|
||||
bool SetTrackAudioCommand::DefineParams( ShuttleParams & S ){
|
||||
SetTrackBase::DefineParams( S );
|
||||
S.OptionalN( bHasMute ).Define( bMute, wxT("Mute"), false );
|
||||
@@ -239,6 +244,8 @@ bool SetTrackAudioCommand::ApplyInner(const CommandContext & context, Track * t
|
||||
const ComponentInterfaceSymbol SetTrackVisualsCommand::Symbol
|
||||
{ XO("Set Track Visuals") };
|
||||
|
||||
namespace{ BuiltinCommandsModule::Registration< SetTrackVisualsCommand > reg3; }
|
||||
|
||||
enum kColours
|
||||
{
|
||||
kColour0,
|
||||
@@ -430,6 +437,8 @@ bool SetTrackVisualsCommand::ApplyInner(const CommandContext & context, Track *
|
||||
const ComponentInterfaceSymbol SetTrackCommand::Symbol
|
||||
{ XO("Set Track") };
|
||||
|
||||
namespace{ BuiltinCommandsModule::Registration< SetTrackCommand > reg4; }
|
||||
|
||||
SetTrackCommand::SetTrackCommand()
|
||||
{
|
||||
mSetStatus.mbPromptForTracks = false;
|
||||
|
||||
Reference in New Issue
Block a user