Browse Source

Projucer: Added a "Reset to Defaults" button to the global paths window

tags/2021-05-28
ed 7 years ago
parent
commit
a58b3ff38b
1 changed files with 24 additions and 2 deletions
  1. +24
    -2
      extras/Projucer/Source/Application/Windows/jucer_GlobalPathsWindowComponent.h

+ 24
- 2
extras/Projucer/Source/Application/Windows/jucer_GlobalPathsWindowComponent.h View File

@@ -66,6 +66,9 @@ public:
addChildComponent (rescanUserPathButton);
rescanUserPathButton.onClick = [] { ProjucerApplication::getApp().rescanUserPathModules(); };
addAndMakeVisible (resetToDefaultsButton);
resetToDefaultsButton.onClick = [this] { resetCurrentOSPathsToDefaults(); };
updateValues();
updateFilePathPropertyComponents();
}
@@ -127,6 +130,8 @@ public:
isFirst = false;
}
resetToDefaultsButton.setBounds (b.removeFromBottom (35).reduced (150, 0));
}
void highlightJUCEPath()
@@ -149,8 +154,9 @@ private:
OwnedArray<Label> pathPropertyLabels;
OwnedArray<PropertyComponent> pathPropertyComponents;
TextButton rescanJUCEPathButton { "Re-scan" },
rescanUserPathButton { "Re-scan" };
TextButton rescanJUCEPathButton { "Re-scan" },
rescanUserPathButton { "Re-scan" },
resetToDefaultsButton { "Reset to Defaults" };
ComboBox osSelector;
InfoButton info;
@@ -291,6 +297,22 @@ private:
}
}
void resetCurrentOSPathsToDefaults()
{
jucePathValue .resetToDefault();
juceModulePathValue .resetToDefault();
userModulePathValue .resetToDefault();
vst3PathValue .resetToDefault();
rtasPathValue .resetToDefault();
aaxPathValue .resetToDefault();
androidSDKPathValue .resetToDefault();
androidNDKPathValue .resetToDefault();
clionExePathValue .resetToDefault();
androidStudioExePathValue.resetToDefault();
repaint();
}
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlobalPathsWindowComponent)
};

Loading…
Cancel
Save