Include tips in command list.
This commit is contained in:
parent
5c2f35d96f
commit
1551a5a073
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -198,6 +198,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;
|
||||
|
@ -224,6 +249,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();
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,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…
Reference in New Issue