| @@ -408,7 +408,7 @@ private: | |||||
| for (auto missingModule : missingDependencies) | for (auto missingModule : missingDependencies) | ||||
| { | { | ||||
| if (auto* info = list.getModuleWithID (missingModule)) | if (auto* info = list.getModuleWithID (missingModule)) | ||||
| modules.addModule (info->moduleFolder, copyLocally, useGlobalPath); | |||||
| modules.addModule (info->moduleFolder, copyLocally, useGlobalPath, false); | |||||
| else | else | ||||
| missing.add (missingModule); | missing.add (missingModule); | ||||
| } | } | ||||
| @@ -543,7 +543,8 @@ public: | |||||
| for (int i = 0; i < modules.size(); ++i) | for (int i = 0; i < modules.size(); ++i) | ||||
| project.getModules().addModule (modules.getReference(i).moduleFolder, | project.getModules().addModule (modules.getReference(i).moduleFolder, | ||||
| project.getModules().areMostModulesCopiedLocally(), | project.getModules().areMostModulesCopiedLocally(), | ||||
| project.getModules().areMostModulesUsingGlobalPath()); | |||||
| project.getModules().areMostModulesUsingGlobalPath(), | |||||
| true); | |||||
| } | } | ||||
| void addSubItems() override | void addSubItems() override | ||||
| @@ -586,7 +587,6 @@ public: | |||||
| void handlePopupMenuResult (int resultCode) override | void handlePopupMenuResult (int resultCode) override | ||||
| { | { | ||||
| auto& modules = project.getModules(); | auto& modules = project.getModules(); | ||||
| auto numModulesBefore = modules.getNumModules(); | |||||
| if (resultCode == 1001) | if (resultCode == 1001) | ||||
| { | { | ||||
| @@ -601,14 +601,6 @@ public: | |||||
| else if (resultCode < 400) | else if (resultCode < 400) | ||||
| modules.addModuleInteractive (getAvailableModulesInExporterPaths() [resultCode - 300]); | modules.addModuleInteractive (getAvailableModulesInExporterPaths() [resultCode - 300]); | ||||
| } | } | ||||
| if (modules.getNumModules() == numModulesBefore + 1) | |||||
| { | |||||
| StringPairArray data; | |||||
| data.set ("label", modules.getModuleID (modules.getNumModules() - 1)); | |||||
| Analytics::getInstance()->logEvent ("Module Added", data, ProjucerAnalyticsEvent::projectEvent); | |||||
| } | |||||
| } | } | ||||
| StringArray getAvailableModulesInGlobalJucePath() | StringArray getAvailableModulesInGlobalJucePath() | ||||
| @@ -775,7 +775,7 @@ Value EnabledModuleList::shouldCopyModuleFilesLocally (const String& moduleID) c | |||||
| .getPropertyAsValue (Ids::useLocalCopy, getUndoManager()); | .getPropertyAsValue (Ids::useLocalCopy, getUndoManager()); | ||||
| } | } | ||||
| void EnabledModuleList::addModule (const File& moduleFolder, bool copyLocally, bool useGlobalPath) | |||||
| void EnabledModuleList::addModule (const File& moduleFolder, bool copyLocally, bool useGlobalPath, bool sendAnalyticsEvent) | |||||
| { | { | ||||
| ModuleDescription info (moduleFolder); | ModuleDescription info (moduleFolder); | ||||
| @@ -801,10 +801,13 @@ void EnabledModuleList::addModule (const File& moduleFolder, bool copyLocally, b | |||||
| for (Project::ExporterIterator exporter (project); exporter.next();) | for (Project::ExporterIterator exporter (project); exporter.next();) | ||||
| exporter->getPathForModuleValue (moduleID) = path.toUnixStyle(); | exporter->getPathForModuleValue (moduleID) = path.toUnixStyle(); | ||||
| StringPairArray data; | |||||
| data.set ("label", moduleID); | |||||
| if (sendAnalyticsEvent) | |||||
| { | |||||
| StringPairArray data; | |||||
| data.set ("label", moduleID); | |||||
| Analytics::getInstance()->logEvent ("Module Added", data, ProjucerAnalyticsEvent::projectEvent); | |||||
| Analytics::getInstance()->logEvent ("Module Added", data, ProjucerAnalyticsEvent::projectEvent); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -961,20 +964,20 @@ void EnabledModuleList::addModuleInteractive (const String& moduleID) | |||||
| list.scanGlobalJuceModulePath(); | list.scanGlobalJuceModulePath(); | ||||
| if (auto* info = list.getModuleWithID (moduleID)) | if (auto* info = list.getModuleWithID (moduleID)) | ||||
| { | { | ||||
| addModule (info->moduleFolder, areMostModulesCopiedLocally(), areMostModulesUsingGlobalPath()); | |||||
| addModule (info->moduleFolder, areMostModulesCopiedLocally(), areMostModulesUsingGlobalPath(), true); | |||||
| return; | return; | ||||
| } | } | ||||
| list.scanGlobalUserModulePath(); | list.scanGlobalUserModulePath(); | ||||
| if (auto* info = list.getModuleWithID (moduleID)) | if (auto* info = list.getModuleWithID (moduleID)) | ||||
| { | { | ||||
| addModule (info->moduleFolder, areMostModulesCopiedLocally(), areMostModulesUsingGlobalPath()); | |||||
| addModule (info->moduleFolder, areMostModulesCopiedLocally(), areMostModulesUsingGlobalPath(), true); | |||||
| return; | return; | ||||
| } | } | ||||
| list.scanProjectExporterModulePaths (project); | list.scanProjectExporterModulePaths (project); | ||||
| if (auto* info = list.getModuleWithID (moduleID)) | if (auto* info = list.getModuleWithID (moduleID)) | ||||
| addModule (info->moduleFolder, areMostModulesCopiedLocally(), false); | |||||
| addModule (info->moduleFolder, areMostModulesCopiedLocally(), false, true); | |||||
| else | else | ||||
| addModuleFromUserSelectedFile(); | addModuleFromUserSelectedFile(); | ||||
| } | } | ||||
| @@ -997,8 +1000,9 @@ void EnabledModuleList::addModuleOfferingToCopy (const File& f, bool isFromUserS | |||||
| return; | return; | ||||
| } | } | ||||
| addModule (m.moduleFolder, areMostModulesCopiedLocally(), isFromUserSpecifiedFolder ? false | |||||
| : areMostModulesUsingGlobalPath()); | |||||
| addModule (m.moduleFolder, areMostModulesCopiedLocally(), | |||||
| isFromUserSpecifiedFolder ? false : areMostModulesUsingGlobalPath(), | |||||
| true); | |||||
| } | } | ||||
| bool isJUCEFolder (const File& f) | bool isJUCEFolder (const File& f) | ||||
| @@ -155,7 +155,7 @@ public: | |||||
| ModuleDescription getModuleInfo (const String& moduleID); | ModuleDescription getModuleInfo (const String& moduleID); | ||||
| File getModuleFolder (const String& moduleID); | File getModuleFolder (const String& moduleID); | ||||
| void addModule (const File& moduleManifestFile, bool copyLocally, bool useGlobalPath); | |||||
| void addModule (const File& moduleManifestFile, bool copyLocally, bool useGlobalPath, bool sendAnalyticsEvent); | |||||
| void addModuleInteractive (const String& moduleID); | void addModuleInteractive (const String& moduleID); | ||||
| void addModuleFromUserSelectedFile(); | void addModuleFromUserSelectedFile(); | ||||
| void addModuleOfferingToCopy (const File&, bool isFromUserSpecifiedFolder); | void addModuleOfferingToCopy (const File&, bool isFromUserSpecifiedFolder); | ||||
| @@ -187,7 +187,7 @@ struct NewProjectWizard | |||||
| for (int i = 0; i < mods.size(); ++i) | for (int i = 0; i < mods.size(); ++i) | ||||
| if (const ModuleDescription* info = list.getModuleWithID (mods[i])) | if (const ModuleDescription* info = list.getModuleWithID (mods[i])) | ||||
| project.getModules().addModule (info->moduleFolder, false, useGlobalPath); | |||||
| project.getModules().addModule (info->moduleFolder, false, useGlobalPath, false); | |||||
| } | } | ||||
| void addExporters (Project& project, WizardComp& wizardComp) | void addExporters (Project& project, WizardComp& wizardComp) | ||||