1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-29 02:40:05 +00:00

Introjucer: Refactored global path implementation

This commit is contained in:
jules 2015-08-20 12:46:47 +01:00
parent 2194bc9c97
commit 21dabf778d
13 changed files with 213 additions and 266 deletions

View file

@ -12,24 +12,16 @@
#include "jucer_DependencyPathPropertyComponent.h"
#include "../Application/jucer_GlobalPreferences.h"
//==============================================================================
const String DependencyPath::vst2KeyName = "vst2Path";
const String DependencyPath::vst3KeyName = "vst3Path";
const String DependencyPath::rtasKeyName = "rtasPath";
const String DependencyPath::aaxKeyName = "aaxPath";
const String DependencyPath::androidSdkKeyName = "androidSdkPath";
const String DependencyPath::androidNdkKeyName = "androidNdkPath";
//==============================================================================
DependencyPathValueSource::DependencyPathValueSource (const Value& projectSettingsPath,
String globalSettingsKey,
Identifier globalSettingsKey,
DependencyPathOS osThisSettingAppliesTo)
: projectSettingsValue (projectSettingsPath),
globalKey (globalSettingsKey),
os (osThisSettingAppliesTo),
globalSettingsValue (PathSettingsTab::getPathByKey (globalKey, os)),
fallbackValue (PathSettingsTab::getFallbackPathByKey (globalKey, os))
globalSettingsValue (getAppSettings().getGlobalPath (globalKey, os)),
fallbackValue (getAppSettings().getFallbackPath (globalKey, os))
{
globalSettingsValue.addListener (this);
}
@ -41,7 +33,7 @@ bool DependencyPathValueSource::isValidPath() const
if (! appliesToThisOS())
return true;
return PathSettingsTab::checkPathByKey (globalKey, getValue().toString());
return getAppSettings().isGlobalPathValid (globalKey, getValue().toString());
}
//==============================================================================