IDE: use IDEMessageDialog instead of LCL

git-svn-id: trunk@48909 -
This commit is contained in:
mattias 2015-05-01 08:24:46 +00:00
parent 5d06fc87a9
commit ad0a80376f

View File

@ -46,7 +46,7 @@ uses
{$IFDEF IDE_MEM_CHECK} {$IFDEF IDE_MEM_CHECK}
MemCheck, MemCheck,
{$ENDIF} {$ENDIF}
Classes, SysUtils, TypInfo, FPCAdds, LCLProc, LCLIntf, LCLType, Forms, Classes, SysUtils, TypInfo, FPCAdds, LCLProc, Forms,
FileUtil, Laz2_XMLCfg, Controls, Dialogs, maps, LazFileUtils, LazFileCache, FileUtil, Laz2_XMLCfg, Controls, Dialogs, maps, LazFileUtils, LazFileCache,
LazUTF8, LazUTF8,
// codetools // codetools
@ -1541,8 +1541,7 @@ begin
if not fSource.Save then begin if not fSource.Save then begin
ACaption:='Write error'; ACaption:='Write error';
AText:='Unable to write file "'+Filename+'"!'; AText:='Unable to write file "'+Filename+'"!';
Result:=Application.MessageBox(PChar(AText),PChar(ACaption) Result:=IDEMessageDialog(ACaption,AText,mtError,mbAbortRetryIgnore);
,MB_ABORTRETRYIGNORE);
if Result=mrAbort then exit; if Result=mrAbort then exit;
if Result=mrIgnore then Result:=mrOk; if Result=mrIgnore then Result:=mrOk;
end else begin end else begin
@ -1570,8 +1569,7 @@ begin
if not fSource.SaveToFile(AFileName) then begin if not fSource.SaveToFile(AFileName) then begin
ACaption:='Write error'; ACaption:='Write error';
AText:='Unable to write file "'+AFilename+'"!'; AText:='Unable to write file "'+AFilename+'"!';
Result:=Application.MessageBox(PChar(AText),PChar(ACaption) Result:=IDEMessageDialog(ACaption,AText,mtError,mbAbortRetryIgnore);
,MB_ABORTRETRYIGNORE);
if Result=mrAbort then exit; if Result=mrAbort then exit;
if Result=mrIgnore then Result:=mrOk; if Result=mrIgnore then Result:=mrOk;
end else end else
@ -1594,7 +1592,7 @@ begin
if NewSource=nil then begin if NewSource=nil then begin
ACaption:=lisCodeToolsDefsReadError; ACaption:=lisCodeToolsDefsReadError;
AText:=Format(lisUnableToReadFile2, [Filename]); AText:=Format(lisUnableToReadFile2, [Filename]);
Result:=Application.MessageBox(PChar(AText),PChar(ACaption),MB_ABORTRETRYIGNORE); Result:=IDEMessageDialog(ACaption,AText,mtError,mbAbortRetryIgnore);
if Result in [mrAbort,mrIgnore] then if Result in [mrAbort,mrIgnore] then
exit; exit;
end else begin end else begin