1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

PluginListComponent: Replace inappropriate naming with more suitable alternatives

This commit is contained in:
Anthony Nicholls 2025-06-06 11:37:37 +01:00 committed by Anthony Nicholls
parent f3d7c74ea1
commit 46703f3e65

View file

@ -197,7 +197,7 @@ public:
ModalCallbackFunction::create ([this] (auto result) ModalCallbackFunction::create ([this] (auto result)
{ {
if (result != 0) if (result != 0)
warnUserAboutStupidPaths(); warnUserAboutUnsuitablePaths();
else else
finishedScan(); finishedScan();
})); }));
@ -241,13 +241,13 @@ private:
ScopedMessageBox messageBox; ScopedMessageBox messageBox;
// Try to dissuade people from to scanning their entire C: drive, or other system folders. // Try to dissuade people from to scanning their entire C: drive, or other system folders.
void warnUserAboutStupidPaths() void warnUserAboutUnsuitablePaths()
{ {
for (int i = 0; i < pathList.getPath().getNumPaths(); ++i) for (int i = 0; i < pathList.getPath().getNumPaths(); ++i)
{ {
auto f = pathList.getPath().getRawString (i); auto f = pathList.getPath().getRawString (i);
if (File::isAbsolutePath (f) && isStupidPath (File (f))) if (File::isAbsolutePath (f) && isUnsuitablePath (File (f)))
{ {
auto options = MessageBoxOptions::makeOptionsOkCancel (MessageBoxIconType::WarningIcon, auto options = MessageBoxOptions::makeOptionsOkCancel (MessageBoxIconType::WarningIcon,
TRANS ("Plugin Scanning"), TRANS ("Plugin Scanning"),
@ -273,7 +273,7 @@ private:
startScan(); startScan();
} }
static bool isStupidPath (const File& f) static bool isUnsuitablePath (const File& f)
{ {
Array<File> roots; Array<File> roots;
File::findFileSystemRoots (roots); File::findFileSystemRoots (roots);
@ -281,7 +281,7 @@ private:
if (roots.contains (f)) if (roots.contains (f))
return true; return true;
File::SpecialLocationType pathsThatWouldBeStupidToScan[] File::SpecialLocationType pathsThatWouldBeUnsuitableToScan[]
= { File::globalApplicationsDirectory, = { File::globalApplicationsDirectory,
File::userHomeDirectory, File::userHomeDirectory,
File::userDocumentsDirectory, File::userDocumentsDirectory,
@ -291,7 +291,7 @@ private:
File::userMoviesDirectory, File::userMoviesDirectory,
File::userPicturesDirectory }; File::userPicturesDirectory };
for (auto location : pathsThatWouldBeStupidToScan) for (auto location : pathsThatWouldBeUnsuitableToScan)
{ {
auto sillyFolder = File::getSpecialLocation (location); auto sillyFolder = File::getSpecialLocation (location);