mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-05 16:43:52 +01: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:
@@ -27,7 +27,11 @@
|
|||||||
const ComponentInterfaceSymbol HelpCommand::Symbol
|
const ComponentInterfaceSymbol HelpCommand::Symbol
|
||||||
{ XO("Help") };
|
{ XO("Help") };
|
||||||
|
|
||||||
|
const ComponentInterfaceSymbol CommentCommand::Symbol
|
||||||
|
{ XO("Comment") };
|
||||||
|
|
||||||
namespace{ BuiltinCommandsModule::Registration< HelpCommand > reg; }
|
namespace{ BuiltinCommandsModule::Registration< HelpCommand > reg; }
|
||||||
|
namespace{ BuiltinCommandsModule::Registration< CommentCommand > reg2; }
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
kJson,
|
kJson,
|
||||||
@@ -103,3 +107,19 @@ bool HelpCommand::ApplyInner(const CommandContext & context){
|
|||||||
return true;
|
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;
|
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__ */
|
#endif /* End of include guard: __HELPCOMMAND__ */
|
||||||
|
|||||||
Reference in New Issue
Block a user