i wonder if it is possible to integrate tight the FilenameComponent and RecentlyUsedFileList. One takes last used files as StringArray, the other have only restore/to String methods. Could be good to have this:
const StringArray RecentlyOpenedFilesList::getFilenamesArray () const
{
return files;
}
so we can do:
simple and clean
(or maybe there are other ways to do this cleanly ?)
eventually i find useful to have a getter for max items
int RecentlyOpenedFilesList::getMaxNumberOfItems () const
{
return maxNumberOfItems;
}
so we could save it in a config file.
other thing i would like to see is this:
void FilenameComponent::setDefaultStartDirectory (File newDefaultStartDirectory)
{
if (newDefaultStartDirectory.existsAsFile ())
defaultStartDirectory = newDefaultStartDirectory.getParentDirectory ();
else
defaultStartDirectory = newDefaultStartDirectory;
}
void FilenameComponent::buttonClicked (Button*)
{
FileChooser fc (TRANS("Choose a new file"),
(getCurrentFile() != File::nonexistent) ? getCurrentFile()
: defaultStartDirectory,
wildcard);
if (isDir ? fc.browseForDirectory()
: (isSaving ? fc.browseForFileToSave (false)
: fc.browseForFileToOpen()))
{
setCurrentFile (fc.getResult(), true);
}
}
that let you set a default start directory when no files are selected in the component.
reasonable ideas ?