Skip to content

Commit 8c0e61f

Browse files
committed
feat: use the more native MessageDlg on all platforms when we don't need additional dialog features
1 parent c35a35c commit 8c0e61f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

source/apphelpers.pas

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ TAppSettings = class(TObject)
438438
AppLanguageMoBasePath: String;
439439
MutexHandle: THandle = 0;
440440
SystemImageList: TImageList = nil;
441-
mtCriticalConfirmation: TMsgDlgType = mtCustom;
441+
mtCriticalConfirmation: TMsgDlgType = mtWarning;
442442
//ConfirmIcon: TIcon;
443443
NumberChars: TSysCharSet;
444444
LibHandleUser32: THandle;
@@ -2323,6 +2323,13 @@ function MessageDialog(const Title, Msg: string; DlgType: TMsgDlgType; Buttons:
23232323
Btn.Default := True;
23242324
end;
23252325
begin
2326+
2327+
if (KeepAskingSetting = asUnused) and (FooterText.IsEmpty) then begin
2328+
// Show the more native MessageDlg when we don't need additional dialog features
2329+
Result := MessageDlg(Title, Msg, DlgType, Buttons, 0);
2330+
Exit;
2331+
end;
2332+
23262333
// Remember current path and restore it later, so the caller does not try to read from the wrong path after this dialog
23272334
AppSettings.StorePath;
23282335

0 commit comments

Comments
 (0)