mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 08:47:59 +02:00
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:
parent
af575ea5ea
commit
646e531114
@ -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;
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user