From 810e73b2bc462608bf8b70c8b1fc010344887d5f Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 21 Mar 2013 16:10:59 +0000 Subject: [PATCH] Introjucer: warning if trying to save read-only file. --- .../Source/Project/jucer_ProjectContentComponent.cpp | 8 +++++++- extras/Introjucer/Source/Utility/jucer_PresetIDs.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp b/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp index db856043aa..4f82e809f7 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp +++ b/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp @@ -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(); diff --git a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h index 97f08ae121..cda2cc6f9f 100644 --- a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h +++ b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h @@ -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);