Browse Source

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

tags/2021-05-28
jules 12 years ago
parent
commit
810e73b2bc
2 changed files with 8 additions and 1 deletions
  1. +7
    -1
      extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp
  2. +1
    -0
      extras/Introjucer/Source/Utility/jucer_PresetIDs.h

+ 7
- 1
extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp View File

@@ -422,7 +422,13 @@ void ProjectContentComponent::closeDocument()
void ProjectContentComponent::saveDocument() void ProjectContentComponent::saveDocument()
{ {
if (currentDocument != nullptr) 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 else
saveProject(); saveProject();


+ 1
- 0
extras/Introjucer/Source/Utility/jucer_PresetIDs.h View File

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


Loading…
Cancel
Save