mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
RTAS description update to use JucePlugin_Desc macro. FileBasedDocument addition for customising save filename. TableHeaderComponent fix to avoid spurious mouse-overs.
This commit is contained in:
parent
493a78f33d
commit
fb01e6dfc2
5 changed files with 27 additions and 12 deletions
|
|
@ -229,6 +229,11 @@ FileBasedDocument::SaveResult FileBasedDocument::saveIfNeededAndUserAgrees()
|
|||
return userCancelledSave;
|
||||
}
|
||||
|
||||
File FileBasedDocument::getSuggestedSaveAsFile (const File& defaultFile)
|
||||
{
|
||||
return defaultFile.withFileExtension (fileExtension).getNonexistentSibling (true);
|
||||
}
|
||||
|
||||
FileBasedDocument::SaveResult FileBasedDocument::saveAsInteractive (const bool warnAboutOverwritingExistingFiles)
|
||||
{
|
||||
File f;
|
||||
|
|
@ -248,8 +253,7 @@ FileBasedDocument::SaveResult FileBasedDocument::saveAsInteractive (const bool w
|
|||
else
|
||||
f = File::getSpecialLocation (File::userDocumentsDirectory).getChildFile (legalFilename);
|
||||
|
||||
f = f.withFileExtension (fileExtension)
|
||||
.getNonexistentSibling (true);
|
||||
f = getSuggestedSaveAsFile (f);
|
||||
|
||||
FileChooser fc (saveFileDialogTitle, f, fileWildcard);
|
||||
|
||||
|
|
|
|||
|
|
@ -275,6 +275,13 @@ protected:
|
|||
*/
|
||||
virtual void setLastDocumentOpened (const File& file) = 0;
|
||||
|
||||
/** This is called by saveAsInteractive() to allow you to optionally customise the
|
||||
filename that the user is presented with in the save dialog.
|
||||
The defaultFile parameter is an initial suggestion based on what the class knows
|
||||
about the current document - you can return a variation on this file with a different
|
||||
extension, etc, or just return something completely different.
|
||||
*/
|
||||
virtual File getSuggestedSaveAsFile (const File& defaultFile);
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue