| 861 | } |
| 862 | |
| 863 | void PluginManager::Save() |
| 864 | { |
| 865 | // Create/Open the registry |
| 866 | auto pRegistry = sFactory(FileNames::PluginRegistry()); |
| 867 | auto ®istry = *pRegistry; |
| 868 | |
| 869 | // Clear pluginregistry.cfg (not audacity.cfg) |
| 870 | registry.Clear(); |
| 871 | |
| 872 | // Save the individual groups |
| 873 | SaveGroup(®istry, PluginTypeEffect); |
| 874 | SaveGroup(®istry, PluginTypeExporter); |
| 875 | SaveGroup(®istry, PluginTypeAudacityCommand); |
| 876 | SaveGroup(®istry, PluginTypeImporter); |
| 877 | SaveGroup(®istry, PluginTypeStub); |
| 878 | |
| 879 | // Not used by 2.1.1 or greater, but must save to allow users to switch between 2.1.0 |
| 880 | // and 2.1.1+. This should be removed after a few releases past 2.1.0. |
| 881 | //SaveGroup(®istry, PluginTypeNone); |
| 882 | |
| 883 | // And now the providers |
| 884 | SaveGroup(®istry, PluginTypeModule); |
| 885 | |
| 886 | // Write the version string |
| 887 | registry.Write(REGVERKEY, REGVERCUR); |
| 888 | |
| 889 | // Just to be safe |
| 890 | registry.Flush(); |
| 891 | |
| 892 | mRegver = REGVERCUR; |
| 893 | } |
| 894 | |
| 895 | void PluginManager::NotifyPluginsChanged() |
| 896 | { |