mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 10:19:12 +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
|
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;
|
||||||
|
@ -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';
|
||||||
|
Loading…
Reference in New Issue
Block a user