mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 14:02:57 +02:00
Include tips in command list.
This commit is contained in:
committed by
Paul Licameli
parent
5c2f35d96f
commit
1551a5a073
@@ -56,6 +56,8 @@ void CommandMessageTarget::EndStruct(){
|
|||||||
Update( " }" );
|
Update( " }" );
|
||||||
}
|
}
|
||||||
void CommandMessageTarget::AddItem(const wxString &value, const wxString &name){
|
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));
|
Update( wxString::Format( "%s%s%s\"%s\"", (mCounts.Last()>0)?", ":"", name, !name.IsEmpty()?":":"",value));
|
||||||
mCounts.Last() += 1;
|
mCounts.Last() += 1;
|
||||||
}
|
}
|
||||||
|
@@ -198,6 +198,31 @@ wxString EffectManager::GetCommandDescription(const PluginID & ID)
|
|||||||
return wxEmptyString;
|
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)
|
void EffectManager::GetCommandDefinition(const PluginID & ID, const CommandContext & context, int flags)
|
||||||
{
|
{
|
||||||
ParamsInterface *command;
|
ParamsInterface *command;
|
||||||
@@ -224,6 +249,8 @@ void EffectManager::GetCommandDefinition(const PluginID & ID, const CommandConte
|
|||||||
command->DefineParams( S );
|
command->DefineParams( S );
|
||||||
S.EndArray();
|
S.EndArray();
|
||||||
}
|
}
|
||||||
|
S.AddItem( GetCommandUrl( ID ), "url" );
|
||||||
|
S.AddItem( GetCommandTip( ID ), "tip" );
|
||||||
S.EndStruct();
|
S.EndStruct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -93,6 +93,8 @@ public:
|
|||||||
wxString GetCommandName(const PluginID & ID);
|
wxString GetCommandName(const PluginID & ID);
|
||||||
wxString GetCommandIdentifier(const PluginID & ID);
|
wxString GetCommandIdentifier(const PluginID & ID);
|
||||||
wxString GetCommandDescription(const PluginID & ID);
|
wxString GetCommandDescription(const PluginID & ID);
|
||||||
|
wxString GetCommandUrl(const PluginID & ID);
|
||||||
|
wxString GetCommandTip(const PluginID & ID);
|
||||||
// flags control which commands are included.
|
// flags control which commands are included.
|
||||||
void GetCommandDefinition(const PluginID & ID, const CommandContext & context, int flags);
|
void GetCommandDefinition(const PluginID & ID, const CommandContext & context, int flags);
|
||||||
bool IsHidden(const PluginID & ID);
|
bool IsHidden(const PluginID & ID);
|
||||||
|
Reference in New Issue
Block a user