1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Auto-enable list of regularly shipped modules (except script-pipe)

This commit is contained in:
Paul Licameli
2020-10-07 09:39:02 -04:00
parent 592518c157
commit 7fd53e8778

View File

@@ -12,8 +12,18 @@
#include "Prefs.h"
#include <unordered_set>
#include <wx/filename.h>
static const std::unordered_set<wxString> &autoEnabledModules()
{
// Add names to this list, of modules that are expected to ship
// with Audacity and enable automatically.
static std::unordered_set<wxString> modules{
};
return modules;
}
// static function that tells us about a module.
int ModuleSettings::GetModuleStatus(const FilePath &fname)
{
@@ -54,6 +64,11 @@ int ModuleSettings::GetModuleStatus(const FilePath &fname)
gPrefs->DeleteEntry( DateTimePref );
}
if (iStatus == kModuleNew) {
if (autoEnabledModules().count(ShortName))
iStatus = kModuleEnabled;
}
return iStatus;
}