mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Formatting
This commit is contained in:
parent
ff0cb4ad5b
commit
4153d59e39
279 changed files with 1281 additions and 1281 deletions
|
|
@ -158,7 +158,7 @@ bool DirectoryContentsList::contains (const File& targetFile) const
|
|||
const ScopedLock sl (fileListLock);
|
||||
|
||||
for (int i = files.size(); --i >= 0;)
|
||||
if (root.getChildFile (files.getUnchecked(i)->filename) == targetFile)
|
||||
if (root.getChildFile (files.getUnchecked (i)->filename) == targetFile)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
@ -246,7 +246,7 @@ bool DirectoryContentsList::addFile (const File& file, const bool isDir,
|
|||
info->isReadOnly = isReadOnly;
|
||||
|
||||
for (int i = files.size(); --i >= 0;)
|
||||
if (files.getUnchecked(i)->filename == info->filename)
|
||||
if (files.getUnchecked (i)->filename == info->filename)
|
||||
return false;
|
||||
|
||||
files.add (std::move (info));
|
||||
|
|
|
|||
|
|
@ -323,9 +323,9 @@ void FileBrowserComponent::setFileFilter (const FileFilter* const newFileFilter)
|
|||
|
||||
String FileBrowserComponent::getActionVerb() const
|
||||
{
|
||||
return isSaveMode() ? ((flags & canSelectDirectories) != 0 ? TRANS("Choose")
|
||||
: TRANS("Save"))
|
||||
: TRANS("Open");
|
||||
return isSaveMode() ? ((flags & canSelectDirectories) != 0 ? TRANS ("Choose")
|
||||
: TRANS ("Save"))
|
||||
: TRANS ("Open");
|
||||
}
|
||||
|
||||
void FileBrowserComponent::setFilenameBoxLabel (const String& name)
|
||||
|
|
@ -529,7 +529,7 @@ void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray&
|
|||
|
||||
for (int i = 0; i < roots.size(); ++i)
|
||||
{
|
||||
const File& drive = roots.getReference(i);
|
||||
const File& drive = roots.getReference (i);
|
||||
|
||||
String name (drive.getFullPathName());
|
||||
rootPaths.add (name);
|
||||
|
|
@ -539,13 +539,13 @@ void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray&
|
|||
String volume (drive.getVolumeLabel());
|
||||
|
||||
if (volume.isEmpty())
|
||||
volume = TRANS("Hard Drive");
|
||||
volume = TRANS ("Hard Drive");
|
||||
|
||||
name << " [" << volume << ']';
|
||||
}
|
||||
else if (drive.isOnCDRomDrive())
|
||||
{
|
||||
name << " [" << TRANS("CD/DVD drive") << ']';
|
||||
name << " [" << TRANS ("CD/DVD drive") << ']';
|
||||
}
|
||||
|
||||
rootNames.add (name);
|
||||
|
|
@ -555,25 +555,25 @@ void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray&
|
|||
rootNames.add ({});
|
||||
|
||||
rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Documents"));
|
||||
rootNames.add (TRANS ("Documents"));
|
||||
rootPaths.add (File::getSpecialLocation (File::userMusicDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Music"));
|
||||
rootNames.add (TRANS ("Music"));
|
||||
rootPaths.add (File::getSpecialLocation (File::userPicturesDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Pictures"));
|
||||
rootNames.add (TRANS ("Pictures"));
|
||||
rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Desktop"));
|
||||
rootNames.add (TRANS ("Desktop"));
|
||||
|
||||
#elif JUCE_MAC
|
||||
rootPaths.add (File::getSpecialLocation (File::userHomeDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Home folder"));
|
||||
rootNames.add (TRANS ("Home folder"));
|
||||
rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Documents"));
|
||||
rootNames.add (TRANS ("Documents"));
|
||||
rootPaths.add (File::getSpecialLocation (File::userMusicDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Music"));
|
||||
rootNames.add (TRANS ("Music"));
|
||||
rootPaths.add (File::getSpecialLocation (File::userPicturesDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Pictures"));
|
||||
rootNames.add (TRANS ("Pictures"));
|
||||
rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Desktop"));
|
||||
rootNames.add (TRANS ("Desktop"));
|
||||
|
||||
rootPaths.add ({});
|
||||
rootNames.add ({});
|
||||
|
|
@ -591,9 +591,9 @@ void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray&
|
|||
rootPaths.add ("/");
|
||||
rootNames.add ("/");
|
||||
rootPaths.add (File::getSpecialLocation (File::userHomeDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Home folder"));
|
||||
rootNames.add (TRANS ("Home folder"));
|
||||
rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName());
|
||||
rootNames.add (TRANS("Desktop"));
|
||||
rootNames.add (TRANS ("Desktop"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -186,12 +186,12 @@ void FileChooserDialogBox::okButtonPressed()
|
|||
{
|
||||
if (warnAboutOverwritingExistingFiles
|
||||
&& content->chooserComponent.isSaveMode()
|
||||
&& content->chooserComponent.getSelectedFile(0).exists())
|
||||
&& content->chooserComponent.getSelectedFile (0).exists())
|
||||
{
|
||||
auto options = MessageBoxOptions::makeOptionsOkCancel (MessageBoxIconType::WarningIcon,
|
||||
TRANS ("File already exists"),
|
||||
TRANS ("There's already a file called: FLNM")
|
||||
.replace ("FLNM", content->chooserComponent.getSelectedFile(0).getFullPathName())
|
||||
.replace ("FLNM", content->chooserComponent.getSelectedFile (0).getFullPathName())
|
||||
+ "\n\n"
|
||||
+ TRANS ("Are you sure you want to overwrite it?"),
|
||||
TRANS ("Overwrite"),
|
||||
|
|
@ -225,13 +225,13 @@ void FileChooserDialogBox::createNewFolder()
|
|||
|
||||
if (parent.isDirectory())
|
||||
{
|
||||
auto* aw = new AlertWindow (TRANS("New Folder"),
|
||||
TRANS("Please enter the name for the folder"),
|
||||
auto* aw = new AlertWindow (TRANS ("New Folder"),
|
||||
TRANS ("Please enter the name for the folder"),
|
||||
MessageBoxIconType::NoIcon, this);
|
||||
|
||||
aw->addTextEditor ("Folder Name", String(), String(), false);
|
||||
aw->addButton (TRANS("Create Folder"), 1, KeyPress (KeyPress::returnKey));
|
||||
aw->addButton (TRANS("Cancel"), 0, KeyPress (KeyPress::escapeKey));
|
||||
aw->addButton (TRANS ("Create Folder"), 1, KeyPress (KeyPress::returnKey));
|
||||
aw->addButton (TRANS ("Cancel"), 0, KeyPress (KeyPress::escapeKey));
|
||||
|
||||
aw->enterModalState (true,
|
||||
ModalCallbackFunction::forComponent (createNewFolderCallback, this,
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ void FileSearchPathListComponent::deleteKeyPressed (int row)
|
|||
|
||||
void FileSearchPathListComponent::returnKeyPressed (int row)
|
||||
{
|
||||
chooser = std::make_unique<FileChooser> (TRANS("Change folder..."), path.getRawString (row), "*");
|
||||
chooser = std::make_unique<FileChooser> (TRANS ("Change folder..."), path.getRawString (row), "*");
|
||||
auto chooserFlags = FileBrowserComponent::openMode | FileBrowserComponent::canSelectDirectories;
|
||||
|
||||
chooser->launchAsync (chooserFlags, [this, row] (const FileChooser& fc)
|
||||
|
|
@ -222,7 +222,7 @@ void FileSearchPathListComponent::addPath()
|
|||
if (start == File())
|
||||
start = File::getCurrentWorkingDirectory();
|
||||
|
||||
chooser = std::make_unique<FileChooser> (TRANS("Add a folder..."), start, "*");
|
||||
chooser = std::make_unique<FileChooser> (TRANS ("Add a folder..."), start, "*");
|
||||
auto chooserFlags = FileBrowserComponent::openMode | FileBrowserComponent::canSelectDirectories;
|
||||
|
||||
chooser->launchAsync (chooserFlags, [this] (const FileChooser& fc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue