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

Couple of minor additions to file browser comps.

This commit is contained in:
jules 2011-10-01 18:26:53 +01:00
parent fee33f45fd
commit 79bf147d89
11 changed files with 210 additions and 136 deletions

View file

@ -257,6 +257,13 @@ void FileBrowserComponent::setRoot (const File& newRootDirectory)
}
}
void FileBrowserComponent::setFileName (const String& newName)
{
filenameBox.setText (newName, true);
fileListComponent->setSelectedFile (currentRoot.getChildFile (newName));
}
void FileBrowserComponent::resetRecentPaths()
{
currentPathBox.clear();
@ -299,6 +306,11 @@ String FileBrowserComponent::getActionVerb() const
return isSaveMode() ? TRANS("Save") : TRANS("Open");
}
void FileBrowserComponent::setFilenameBoxLabel (const String& name)
{
fileLabel.setText (name, false);
}
FilePreviewComponent* FileBrowserComponent::getPreviewComponent() const noexcept
{
return previewComp;