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

View File

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