Auto-enable list of regularly shipped modules (except script-pipe)
This commit is contained in:
parent
592518c157
commit
7fd53e8778
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue