mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-19 06:07:42 +02:00
Include tips in command list.
This commit is contained in:
parent
500765329f
commit
a8903a6c56
@ -56,6 +56,8 @@ void CommandMessageTarget::EndStruct(){
|
||||
Update( " }" );
|
||||
}
|
||||
void CommandMessageTarget::AddItem(const wxString &value, const wxString &name){
|
||||
wxString Temp = value;
|
||||
Temp.Replace("\"", "\\\"");// escape spaces.
|
||||
Update( wxString::Format( "%s%s%s\"%s\"", (mCounts.Last()>0)?", ":"", name, !name.IsEmpty()?":":"",value));
|
||||
mCounts.Last() += 1;
|
||||
}
|
||||
|
@ -190,6 +190,31 @@ wxString EffectManager::GetCommandDescription(const PluginID & ID)
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
wxString EffectManager::GetCommandUrl(const PluginID & ID)
|
||||
{
|
||||
Effect* pEff = GetEffect(ID);
|
||||
if( pEff )
|
||||
return pEff->ManualPage();
|
||||
AudacityCommand * pCom = GetAudacityCommand(ID);
|
||||
if( pCom )
|
||||
return pCom->ManualPage();
|
||||
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
wxString EffectManager::GetCommandTip(const PluginID & ID)
|
||||
{
|
||||
Effect* pEff = GetEffect(ID);
|
||||
if( pEff )
|
||||
return pEff->GetDescription();
|
||||
AudacityCommand * pCom = GetAudacityCommand(ID);
|
||||
if( pCom )
|
||||
return pCom->GetDescription();
|
||||
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
|
||||
void EffectManager::GetCommandDefinition(const PluginID & ID, const CommandContext & context, int flags)
|
||||
{
|
||||
ParamsInterface *command;
|
||||
@ -216,6 +241,8 @@ void EffectManager::GetCommandDefinition(const PluginID & ID, const CommandConte
|
||||
command->DefineParams( S );
|
||||
S.EndArray();
|
||||
}
|
||||
S.AddItem( GetCommandUrl( ID ), "url" );
|
||||
S.AddItem( GetCommandTip( ID ), "tip" );
|
||||
S.EndStruct();
|
||||
}
|
||||
|
||||
|
@ -91,6 +91,8 @@ public:
|
||||
wxString GetCommandName(const PluginID & ID);
|
||||
wxString GetCommandIdentifier(const PluginID & ID);
|
||||
wxString GetCommandDescription(const PluginID & ID);
|
||||
wxString GetCommandUrl(const PluginID & ID);
|
||||
wxString GetCommandTip(const PluginID & ID);
|
||||
// flags control which commands are included.
|
||||
void GetCommandDefinition(const PluginID & ID, const CommandContext & context, int flags);
|
||||
bool IsHidden(const PluginID & ID);
|
||||
|
Loading…
x
Reference in New Issue
Block a user