IDE: new project: ask to save changed project: nicer buttons

git-svn-id: trunk@31249 -
This commit is contained in:
mattias 2011-06-16 11:34:17 +00:00
parent 1fc6a30b76
commit 27d1183df6

View File

@ -10413,19 +10413,17 @@ begin
Result:=ProjectDesc.InitDescriptor;
if Result<>mrOk then exit;
// invalidate cached substituted macros
IncreaseCompilerParseStamp;
// close current project first
If Project1<>nil then begin
if SomethingOfProjectIsModified then begin
Result:=MessageDlg(lisProjectChanged, Format(lisSaveChangesToProject,
Result:=IDEQuestionDialog(lisProjectChanged, Format(lisSaveChangesToProject,
[Project1.GetTitleOrName]),
mtconfirmation, [mbYes, mbNo, mbAbort], 0);
mtConfirmation, [mrYes, lisHintSave, mrNo, lisDiscardChanges, mrAbort,
dlgCancel]);
if Result=mrYes then begin
Result:=DoSaveProject([]);
if Result=mrAbort then exit;
end else if Result in [mrCancel,mrAbort] then
end else if Result<>mrNo then
exit;
end;
Result:=DoCloseProject;
@ -10434,6 +10432,9 @@ begin
// create a virtual project (i.e. unsaved and without real project directory)
// invalidate cached substituted macros
IncreaseCompilerParseStamp;
// switch codetools to virtual project directory
CodeToolBoss.GlobalValues.Variables[ExternalMacroStart+'ProjPath']:=
VirtualDirectory;