1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-19 01:04:20 +00:00

Added method ComponentPeer::setRepresentedFile() (and used this in the introjucer app)

This commit is contained in:
jules 2013-03-02 19:55:57 +00:00
parent f3abe0b246
commit a50977e2f9
4 changed files with 25 additions and 0 deletions

View file

@ -496,19 +496,25 @@ void ProjectContentComponent::updateMainWindowTitle()
if (MainWindow* mw = findParentComponentOfClass<MainWindow>())
{
String title;
File file;
bool edited = false;
if (currentDocument != nullptr)
{
title = currentDocument->getName();
edited = currentDocument->needsSaving();
file = currentDocument->getFile();
}
if (ComponentPeer* peer = mw->getPeer())
{
if (! peer->setDocumentEditedStatus (edited))
if (edited)
title << "*";
peer->setRepresentedFile (file);
}
mw->updateTitle (title);
}
}