1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-31 07:59:27 +02:00

Comments which IdentInterface functions return persistent values

This commit is contained in:
Paul Licameli 2018-02-04 16:25:08 -05:00
parent 575070e9ae
commit 942175f27b
5 changed files with 23 additions and 1 deletions

View File

@ -64,8 +64,11 @@ public:
virtual ~EffectIdentInterface() {};
virtual EffectType GetType() = 0;
// Returns a string for internal uses only that may persist in config files:
// This string persists in configuration files
// So config compatibility will break if it is changed across Audacity versions
virtual wxString GetFamilyId() = 0;
// Returns a user-visible string:
virtual wxString GetFamilyName() = 0;

View File

@ -51,11 +51,15 @@ public:
// These should return an untranslated value
virtual wxString GetPath() = 0;
// This string persists in configuration files
// So config compatibility will break if it is changed across Audacity versions
virtual wxString GetSymbol() = 0;
// These should return an untranslated value whose translation
// will be determined at runtime (if available)
virtual wxString GetName() = 0;
// This string persists in configuration files
// So config compatibility will break if it is changed across Audacity versions
virtual wxString GetVendor() = 0;
virtual wxString GetVersion() = 0;

View File

@ -2616,6 +2616,8 @@ PluginID PluginManager::GetID(ImporterInterface *importer)
importer->GetPath());
}
// This string persists in configuration files
// So config compatibility will break if it is changed across Audacity versions
wxString PluginManager::GetPluginTypeString(PluginType type)
{
wxString str;
@ -2888,6 +2890,11 @@ bool PluginManager::SetConfig(const wxString & key, const double & value)
/* Return value is a key for lookup in a config file */
wxString PluginManager::SettingsPath(const PluginID & ID, bool shared)
{
// All the strings reported by PluginDescriptor and used in this function
// persist in the plugin settings configuration file, so they should not
// be changed across Audacity versions, or else compatibility of the
// configuration files will break.
if (mPlugins.find(ID) == mPlugins.end())
{
return wxEmptyString;

View File

@ -91,6 +91,8 @@ public:
// Internal string only, no translated counterpart!
// (Use Effect::GetFamilyName instead)
// This string persists in configuration files
// So config compatibility will break if it is changed across Audacity versions
wxString GetEffectFamilyId() const;
EffectType GetEffectType() const;
@ -237,6 +239,8 @@ public:
static PluginID GetID(EffectIdentInterface *effect);
static PluginID GetID(ImporterInterface *importer);
// This string persists in configuration files
// So config compatibility will break if it is changed across Audacity versions
static wxString GetPluginTypeString(PluginType type);
int GetPluginCount(PluginType type);

View File

@ -78,7 +78,11 @@ class AUDACITY_DLL_API Effect /* not final */ : public wxEvtHandler,
// IdentInterface implementation
wxString GetPath() override;
// This string persists in configuration files
// So config compatibility will break if it is changed across Audacity versions
wxString GetSymbol() override;
wxString GetName() override;
wxString GetVendor() override;
wxString GetVersion() override;