1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Introjucer: warning if trying to save read-only file.

This commit is contained in:
jules 2013-03-21 16:10:59 +00:00
parent 2b638dd93b
commit 810e73b2bc
2 changed files with 8 additions and 1 deletions

View file

@ -422,7 +422,13 @@ void ProjectContentComponent::closeDocument()
void ProjectContentComponent::saveDocument()
{
if (currentDocument != nullptr)
currentDocument->save();
{
if (! currentDocument->save())
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
TRANS("Save failed!"),
TRANS("Couldn't save the file:")
+ "\n" + currentDocument->getFile().getFullPathName());
}
else
saveProject();

View file

@ -67,6 +67,7 @@ namespace Ids
DECLARE_ID (optimisation);
DECLARE_ID (defines);
DECLARE_ID (headerPath);
DECLARE_ID (systemHeaderPath);
DECLARE_ID (libraryPath);
DECLARE_ID (customXcodeFlags);
DECLARE_ID (cppLibType);