lcl: use OK and Abort buttons in default exception dialog. Don't kill the application when ESC is pressed to close it.

git-svn-id: trunk@51739 -
This commit is contained in:
ondrej 2016-02-28 07:33:49 +00:00
parent af575ea5ea
commit 646e531114
2 changed files with 9 additions and 9 deletions

View File

@ -1548,17 +1548,17 @@ begin
try
if ExceptionDialog=aedOkMessageBox then
begin
MsgResult := mrOk;
MessageBox(PChar(msg), PChar(GetTitle), MB_OK + MB_ICONERROR);
MsgResult:=PromptUser(GetTitle, msg,
idDialogError, [idButtonOk], 0, idButtonCancel);
end else
MsgResult:=MessageBox(PChar(
Format(rsPressOkToIgnoreAndRiskDataCorruptionPressCancelToK,
[Msg, LineEnding+LineEnding, LineEnding])),
PChar(GetTitle), MB_OKCANCEL + MB_ICONERROR);
MsgResult:=PromptUser(GetTitle,
Format(rsPressOkToIgnoreAndRiskDataCorruptionPressAbortToK,
[Msg, LineEnding+LineEnding, LineEnding]),
idDialogError, [idButtonOk, idButtonAbort], 0, idButtonCancel);
finally
EnableIdleHandler;
end;
if MsgResult<>mrOk then
if MsgResult=idButtonAbort then
begin
Include(FFlags, AppNoExceptionMessages);
HaltingProgram := True;

View File

@ -287,9 +287,9 @@ resourceString
rsRasterImageSaveInUpdate = 'Cannot save image while update in progress';
rsNoWidgetSet = 'No widgetset object. '
+'Please check if the unit "interfaces" was added to the programs uses clause.';
rsPressOkToIgnoreAndRiskDataCorruptionPressCancelToK = '%s'
rsPressOkToIgnoreAndRiskDataCorruptionPressAbortToK = '%s'
+'%sPress OK to ignore and risk data corruption.'
+'%sPress Cancel to kill the program.';
+'%sPress Abort to kill the program.';
rsCanNotFocus = 'Can not focus';
rsListIndexExceedsBounds = 'List index exceeds bounds (%d)';
rsResourceNotFound = 'Resource %s not found';