mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 08:09:32 +02:00
Bug 2295 - ENH: cannot add a comment in a Macro with Audacity
Comments can now be added using the Comment command.
This commit is contained in:
parent
542a9a8d98
commit
894867d692
@ -27,7 +27,11 @@
|
||||
const ComponentInterfaceSymbol HelpCommand::Symbol
|
||||
{ XO("Help") };
|
||||
|
||||
const ComponentInterfaceSymbol CommentCommand::Symbol
|
||||
{ XO("Comment") };
|
||||
|
||||
namespace{ BuiltinCommandsModule::Registration< HelpCommand > reg; }
|
||||
namespace{ BuiltinCommandsModule::Registration< CommentCommand > reg2; }
|
||||
|
||||
enum {
|
||||
kJson,
|
||||
@ -103,3 +107,19 @@ bool HelpCommand::ApplyInner(const CommandContext & context){
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CommentCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( mComment, wxT("_"), "" );
|
||||
return true;
|
||||
}
|
||||
|
||||
void CommentCommand::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
S.AddSpace(0, 5);
|
||||
|
||||
S.StartMultiColumn(2, wxALIGN_CENTER);
|
||||
{
|
||||
S.TieTextBox(XXO("_"),mComment,80);
|
||||
}
|
||||
S.EndMultiColumn();
|
||||
}
|
||||
|
||||
|
@ -43,5 +43,25 @@ public:
|
||||
wxString mCommandName;
|
||||
};
|
||||
|
||||
class CommentCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
int mFormat;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("For comments in a macro.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
bool Apply(const CommandContext & context) override {
|
||||
return false;
|
||||
};
|
||||
// AudacityCommand overrides
|
||||
wxString ManualPage() override {return wxT("Extra_Menu:_Scriptables_II#comment");};
|
||||
public:
|
||||
wxString mComment;
|
||||
};
|
||||
|
||||
|
||||
#endif /* End of include guard: __HELPCOMMAND__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user