diff --git a/packages/delphiXE5/heidisql.dpr b/packages/delphiXE5/heidisql.dpr index 0cd3460f..9df566f1 100644 --- a/packages/delphiXE5/heidisql.dpr +++ b/packages/delphiXE5/heidisql.dpr @@ -44,6 +44,7 @@ uses extra_controls in '..\..\source\extra_controls.pas'; {$R ..\..\res\icon.RES} +{$R ..\..\res\icon-question.RES} {$R ..\..\res\version.RES} {$R ..\..\res\manifest.RES} {$R ..\..\res\updater.RES} diff --git a/res/icon-question.rc b/res/icon-question.rc new file mode 100644 index 00000000..c12433d2 --- /dev/null +++ b/res/icon-question.rc @@ -0,0 +1 @@ +ICONQUESTION ICON "icons\icon-question.ico" \ No newline at end of file diff --git a/res/icons/icon-question.ico b/res/icons/icon-question.ico new file mode 100644 index 00000000..aeef7674 Binary files /dev/null and b/res/icons/icon-question.ico differ diff --git a/res/icons/icon-question.pdn b/res/icons/icon-question.pdn new file mode 100644 index 00000000..c6b3891b Binary files /dev/null and b/res/icons/icon-question.pdn differ diff --git a/source/helpers.pas b/source/helpers.pas index 2ccc1921..92783496 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -333,7 +333,7 @@ var MutexHandle: THandle = 0; SystemImageList: TImageList; mtCriticalConfirmation: TMsgDlgType = mtCustom; - + ConfirmIcon: TIcon; implementation @@ -2342,10 +2342,12 @@ begin mtWarning: Dialog.Caption := _('Warning'); mtError: Dialog.Caption := _('Error'); mtInformation: Dialog.Caption := _('Information'); - mtConfirmation: Dialog.Caption := _('Confirm'); + mtConfirmation, mtCustom: Dialog.Caption := _('Confirm'); end; if Title <> Dialog.Caption then Dialog.Title := Title; + if MainForm.ActiveConnection <> nil then + Dialog.Caption := MainForm.ActiveConnection.Parameters.SessionName + ': ' + Dialog.Caption; rx := TRegExpr.Create; rx.Expression := 'https?\:\/\/\S+'; Dialog.Text := rx.Replace(Msg, '$0', True); @@ -2353,15 +2355,25 @@ begin // Main icon, and footer link case DlgType of - mtWarning: Dialog.MainIcon := tdiWarning; + mtWarning: + Dialog.MainIcon := tdiWarning; mtError: begin Dialog.MainIcon := tdiError; Dialog.FooterText := ''+_('Find some help on this error')+''; Dialog.FooterIcon := tdiInformation; end; - mtInformation: Dialog.MainIcon := tdiInformation; - mtConfirmation: Dialog.MainIcon := tdiInformation; - else Dialog.MainIcon := tdiNone; + mtInformation: + Dialog.MainIcon := tdiInformation; + mtConfirmation, mtCustom: begin + if not Assigned(ConfirmIcon) then begin + ConfirmIcon := TIcon.Create; + ConfirmIcon.LoadFromResourceName(hInstance, 'ICONQUESTION'); + end; + Dialog.Flags := Dialog.Flags + [tfUseHiconMain]; + Dialog.CustomMainIcon := ConfirmIcon; + end; + else + Dialog.MainIcon := tdiNone; end; // Add buttons