diff --git a/extras/Introjucer/Source/Project/jucer_Project.cpp b/extras/Introjucer/Source/Project/jucer_Project.cpp index f05ac5f21c..ba5320ffb9 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.cpp +++ b/extras/Introjucer/Source/Project/jucer_Project.cpp @@ -201,6 +201,12 @@ void Project::addDefaultModules (bool shouldCopyFilesLocally) } } +bool Project::isAudioPluginModuleMissing() const +{ + return getProjectType().isAudioPlugin() + && ! isModuleEnabled ("juce_audio_plugin_client"); +} + //============================================================================== static void registerRecentFile (const File& file) { @@ -254,17 +260,10 @@ Result Project::saveResourcesOnly (const File& file) } //============================================================================== -File Project::lastDocumentOpened; +static File lastDocumentOpened; -File Project::getLastDocumentOpened() -{ - return lastDocumentOpened; -} - -void Project::setLastDocumentOpened (const File& file) -{ - lastDocumentOpened = file; -} +File Project::getLastDocumentOpened() { return lastDocumentOpened; } +void Project::setLastDocumentOpened (const File& file) { lastDocumentOpened = file; } //============================================================================== void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& property) @@ -275,24 +274,10 @@ void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& prope changed(); } -void Project::valueTreeChildAdded (ValueTree& parentTree, ValueTree& childWhichHasBeenAdded) -{ - changed(); -} - -void Project::valueTreeChildRemoved (ValueTree& parentTree, ValueTree& childWhichHasBeenRemoved) -{ - changed(); -} - -void Project::valueTreeChildOrderChanged (ValueTree& parentTree) -{ - changed(); -} - -void Project::valueTreeParentChanged (ValueTree& tree) -{ -} +void Project::valueTreeChildAdded (ValueTree&, ValueTree&) { changed(); } +void Project::valueTreeChildRemoved (ValueTree&, ValueTree&) { changed(); } +void Project::valueTreeChildOrderChanged (ValueTree&) { changed(); } +void Project::valueTreeParentChanged (ValueTree&) {} //============================================================================== File Project::resolveFilename (String filename) const diff --git a/extras/Introjucer/Source/Project/jucer_Project.h b/extras/Introjucer/Source/Project/jucer_Project.h index 511fbdf1e7..c40dff08c6 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.h +++ b/extras/Introjucer/Source/Project/jucer_Project.h @@ -242,7 +242,9 @@ public: void removeModule (const String& moduleID); int getNumModules() const; String getModuleID (int index) const; + void addDefaultModules (bool shouldCopyFilesLocally); + bool isAudioPluginModuleMissing() const; void createRequiredModules (const ModuleList& availableModules, OwnedArray& modules) const; @@ -265,7 +267,6 @@ public: private: friend class Item; ValueTree projectRoot; - static File lastDocumentOpened; DrawableImage mainProjectIcon; void updateProjectSettings(); diff --git a/extras/Introjucer/Source/Project/jucer_ProjectInformationComponent.cpp b/extras/Introjucer/Source/Project/jucer_ProjectInformationComponent.cpp index 1507135040..cf94b4a987 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectInformationComponent.cpp +++ b/extras/Introjucer/Source/Project/jucer_ProjectInformationComponent.cpp @@ -430,6 +430,9 @@ public: "This may create problems if some modules expect to share the same parent folder, so you may " "want to make sure that they are all either copied or not."; + if (project.isAudioPluginModuleMissing()) + newName = "Warning! Your project is an audio plugin, but you haven't enabled the 'juce_audio_plugin_client' module!"; + if (newName != getName()) { setName (newName);