mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #1975: add "keep asking" checkbox to reformat dialog
This commit is contained in:
@ -3,7 +3,7 @@ object frmReformatter: TfrmReformatter
|
|||||||
Top = 0
|
Top = 0
|
||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'Reformat SQL'
|
Caption = 'Reformat SQL'
|
||||||
ClientHeight = 172
|
ClientHeight = 217
|
||||||
ClientWidth = 503
|
ClientWidth = 503
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
@ -16,13 +16,13 @@ object frmReformatter: TfrmReformatter
|
|||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
503
|
503
|
||||||
172)
|
217)
|
||||||
TextHeight = 15
|
TextHeight = 15
|
||||||
object grpReformatter: TRadioGroup
|
object grpReformatter: TRadioGroup
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 487
|
Width = 487
|
||||||
Height = 125
|
Height = 128
|
||||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
Caption = 'Select reformatter'
|
Caption = 'Select reformatter'
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
@ -35,7 +35,7 @@ object frmReformatter: TfrmReformatter
|
|||||||
end
|
end
|
||||||
object btnCancel: TButton
|
object btnCancel: TButton
|
||||||
Left = 420
|
Left = 420
|
||||||
Top = 139
|
Top = 184
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 25
|
Height = 25
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
@ -46,7 +46,7 @@ object frmReformatter: TfrmReformatter
|
|||||||
end
|
end
|
||||||
object btnOk: TButton
|
object btnOk: TButton
|
||||||
Left = 339
|
Left = 339
|
||||||
Top = 139
|
Top = 184
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 25
|
Height = 25
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
@ -59,12 +59,24 @@ object frmReformatter: TfrmReformatter
|
|||||||
object lblFormatProviderLink: TLinkLabel
|
object lblFormatProviderLink: TLinkLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 142
|
Top = 142
|
||||||
Width = 121
|
Width = 149
|
||||||
Height = 19
|
Height = 24
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'lblFormatProviderLink'
|
Caption = 'lblFormatProviderLink'
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
UseVisualStyle = True
|
UseVisualStyle = True
|
||||||
Visible = False
|
Visible = False
|
||||||
OnLinkClick = lblFormatProviderLinkLinkClick
|
OnLinkClick = lblFormatProviderLinkLinkClick
|
||||||
end
|
end
|
||||||
|
object chkKeepAsking: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 188
|
||||||
|
Width = 257
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
Caption = 'Keep asking this question.'
|
||||||
|
Checked = True
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -13,6 +13,7 @@ type
|
|||||||
btnCancel: TButton;
|
btnCancel: TButton;
|
||||||
btnOk: TButton;
|
btnOk: TButton;
|
||||||
lblFormatProviderLink: TLinkLabel;
|
lblFormatProviderLink: TLinkLabel;
|
||||||
|
chkKeepAsking: TCheckBox;
|
||||||
procedure btnOkClick(Sender: TObject);
|
procedure btnOkClick(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
@ -78,6 +79,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if not chkKeepAsking.Checked then begin
|
||||||
|
// No dialog next time please
|
||||||
|
AppSettings.WriteInt(asReformatterNoDialog, grpReformatter.ItemIndex+1);
|
||||||
|
end;
|
||||||
|
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user