From b45bcbc8d50785915e7e8bcc9221177dd1842d66 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 26 Mar 2025 15:44:16 +0100 Subject: [PATCH] Issue #1482: set anchor siblings on remaining forms --- source/about.lfm | 66 +- source/about.pas | 10 +- source/change_password.lfm | 109 ++-- source/column_selection.lfm | 40 +- source/copytable.lfm | 58 +- source/createdatabase.lfm | 63 +- source/csv_detector.lfm | 18 +- source/csv_detector.pas | 2 +- source/customize_highlighter.lfm | 47 +- source/editvar.lfm | 102 +-- source/editvar.pas | 6 +- source/exportgrid.lfm | 152 +++-- source/insertfiles.lfm | 28 +- source/loaddata.lfm | 211 +++--- source/loaddata.pas | 11 +- source/main.lfm | 21 +- source/preferences.lfm | 1025 +++++++++++++++++++----------- source/preferences.pas | 83 +-- source/printlist.lfm | 20 +- source/reformatter.lfm | 3 + source/searchreplace.lfm | 72 ++- source/selectdbobject.lfm | 28 +- source/texteditor.lfm | 82 ++- source/updatecheck.lfm | 32 +- source/usermanager.lfm | 263 ++++---- source/usermanager.pas | 40 +- 26 files changed, 1606 insertions(+), 986 deletions(-) diff --git a/source/about.lfm b/source/about.lfm index 3a4e1c85..a0c41fdd 100644 --- a/source/about.lfm +++ b/source/about.lfm @@ -12,28 +12,35 @@ object AboutBox: TAboutBox FormStyle = fsStayOnTop OnShow = FormShow Position = poOwnerFormCenter - LCLVersion = '3.8.0.0' object lblAppName: TLabel Left = 146 Height = 20 Top = 10 Width = 85 + BorderSpacing.Around = 6 Caption = 'lblAppName' PopupMenu = popupLabels end object lblAppVersion: TLabel + AnchorSideTop.Control = lblAppName + AnchorSideTop.Side = asrBottom Left = 146 Height = 20 - Top = 54 + Top = 42 Width = 93 + BorderSpacing.Top = 6 + BorderSpacing.Around = 6 Caption = 'lblAppVersion' PopupMenu = popupLabels end object lblAppCompiled: TLabel + AnchorSideTop.Control = lblAppVersion + AnchorSideTop.Side = asrBottom Left = 146 Height = 20 - Top = 79 + Top = 68 Width = 110 + BorderSpacing.Around = 6 Caption = 'lblAppCompiled' PopupMenu = popupLabels end @@ -44,6 +51,7 @@ object AboutBox: TAboutBox Top = 10 Width = 90 AutoSize = True + BorderSpacing.Around = 6 OnClick = OpenURL Picture.Data = { 1754506F727461626C654E6574776F726B477261706869637B19000089504E47 @@ -255,102 +263,134 @@ object AboutBox: TAboutBox Transparent = True end object lblDonated: TLabel + AnchorSideTop.Control = lnklblCredits + AnchorSideTop.Side = asrBottom Left = 146 Height = 20 - Top = 214 + Top = 178 Width = 291 + BorderSpacing.Top = 6 + BorderSpacing.Around = 6 Caption = 'I have donated per following email address:' end object lblEnvironment: TLabel + AnchorSideTop.Control = lblAppCompiled + AnchorSideTop.Side = asrBottom Left = 146 Height = 20 - Top = 104 + Top = 94 Width = 100 + BorderSpacing.Around = 6 Caption = 'lblEnvironment' PopupMenu = popupLabels end object lnklblWebpage: TLabel + AnchorSideTop.Control = lblEnvironment + AnchorSideTop.Side = asrBottom Cursor = crHandPoint Left = 146 Height = 20 - Top = 129 + Top = 120 Width = 100 + BorderSpacing.Around = 6 Caption = 'lnklblWebpage' ParentShowHint = False ShowHint = True OnClick = lnklblWebpageClick end object lnklblCredits: TLabel + AnchorSideTop.Control = lnklblWebpage + AnchorSideTop.Side = asrBottom Cursor = crHandPoint Left = 146 Height = 20 - Top = 154 + Top = 146 Width = 46 + BorderSpacing.Around = 6 Caption = 'Credits' ParentShowHint = False ShowHint = True OnClick = lnklblCreditsClick end object btnClose: TButton + AnchorSideTop.Side = asrBottom Left = 437 Height = 31 Top = 345 Width = 128 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Close' ModalResult = 1 TabOrder = 0 end object btnUpdateCheck: TButton + AnchorSideTop.Side = asrBottom Left = 146 Height = 31 Top = 345 Width = 286 Action = MainForm.actUpdateCheck Anchors = [akLeft, akRight, akBottom] + BorderSpacing.Around = 6 TabOrder = 1 end object editDonated: TEdit + AnchorSideTop.Control = lblDonated + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = btnDonatedOK Left = 146 Height = 28 - Top = 238 - Width = 286 + Top = 204 + Width = 285 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 TabOrder = 2 TextHint = 'Email address' OnEnter = editDonatedEnter OnExit = editDonatedExit end object btnDonatedOK: TButton + AnchorSideTop.Control = lblDonated + AnchorSideTop.Side = asrBottom Left = 437 Height = 31 - Top = 238 + Top = 204 Width = 128 Anchors = [akTop, akRight] + BorderSpacing.Around = 6 Caption = 'OK' TabOrder = 3 OnClick = btnDonatedOKClick end object btnDonate: TButton + AnchorSideTop.Control = editDonated + AnchorSideTop.Side = asrBottom Left = 146 Height = 30 Hint = 'Send an arbitrary amount as donation to the author - per PayPal (also supports credit cards)' - Top = 272 + Top = 238 Width = 419 Anchors = [akTop, akLeft, akRight] AutoSize = True + BorderSpacing.Around = 6 Caption = 'Donate' ParentShowHint = False ShowHint = True TabOrder = 4 end object lnklblCompiler: TLabel + AnchorSideLeft.Control = lblAppCompiled + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = lblAppVersion + AnchorSideTop.Side = asrBottom Cursor = crHandPoint - Left = 308 + Left = 262 Height = 20 - Top = 79 + Top = 68 Width = 97 + BorderSpacing.Around = 6 Caption = 'lnklblCompiler' ParentShowHint = False ShowHint = True diff --git a/source/about.pas b/source/about.pas index 9e06c312..600cf62c 100644 --- a/source/about.pas +++ b/source/about.pas @@ -120,9 +120,7 @@ begin Caption := f_('About %s', [APPNAME]); lblAppName.Caption := APPNAME; lblAppVersion.Caption := _('Version') + ' ' + Mainform.AppVersion; - lblAppCompiled.Caption := _('Compiled on:') + ' ' + {DateTimeToStr(GetImageLinkTimeStamp(Application.ExeName)) +} ' with'; - lnklblCompiler.Top := lblAppCompiled.Top; - lnklblCompiler.Left := lblAppCompiled.Left + lblAppCompiled.Width + Canvas.TextWidth(' '); + lblAppCompiled.Caption := _('Compiled on:') + ' ?' + {DateTimeToStr(GetImageLinkTimeStamp(Application.ExeName)) +} ' with'; lnklblCompiler.Caption := GetCompilerVersion; lnklblCompiler.Hint := 'https://www.lazarus-ide.org/?utm_source='+APPNAME; lnklblWebpage.Caption := APPDOMAIN; @@ -133,11 +131,7 @@ begin lnklblCredits.Font.Style := lnklblCredits.Font.Style + [fsUnderline]; ImageHeidisql.Hint := APPDOMAIN+'?place='+EncodeURLParam(ImageHeidisql.Name); - lblEnvironment.Caption := _('Environment:') + ' ' + - {$IFDEF WINDOWS}'Windows'{$EndIf} - {$IFDEF LINUX}'Linux'{$EndIf} - {$IFDEF MACOS}'MacOS'{$EndIf} - ; + lblEnvironment.Caption := _('Environment:') + ' ' + GetOS; Screen.Cursor := crDefault; btnClose.TrySetFocus; diff --git a/source/change_password.lfm b/source/change_password.lfm index d8d30556..cfc6c49d 100644 --- a/source/change_password.lfm +++ b/source/change_password.lfm @@ -1,11 +1,11 @@ object frmPasswordChange: TfrmPasswordChange Left = 0 - Height = 234 + Height = 231 Top = 0 Width = 570 BorderStyle = bsDialog Caption = 'Change expired password' - ClientHeight = 234 + ClientHeight = 231 ClientWidth = 570 Color = clBtnFace Constraints.MaxHeight = 375 @@ -16,47 +16,57 @@ object frmPasswordChange: TfrmPasswordChange OnCreate = FormCreate OnShow = FormShow Position = poMainFormCenter - LCLVersion = '3.8.0.0' object lblHeading: TLabel - Left = 10 - Height = 17 - Top = 20 - Width = 436 + Left = 6 + Height = 60 + Top = 6 + Width = 558 + Align = alTop Anchors = [akTop, akLeft, akRight, akBottom] AutoSize = False + BorderSpacing.Around = 6 Caption = 'lblHeading' WordWrap = True end object lblPassword: TLabel - Left = 10 - Height = 13 - Top = 52 - Width = 74 - Anchors = [akLeft, akBottom] + AnchorSideTop.Control = lblHeading + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 20 + Top = 72 + Width = 100 + BorderSpacing.Around = 6 Caption = 'New password:' end object lblRepeatPassword: TLabel - Left = 10 - Height = 13 - Top = 85 - Width = 111 - Anchors = [akLeft, akBottom] + AnchorSideTop.Control = editPassword + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 20 + Top = 106 + Width = 148 + BorderSpacing.Around = 6 Caption = 'Repeat new password:' end object lblStatus: TLabel - Left = 10 - Height = 13 - Top = 122 - Width = 41 - Anchors = [akLeft, akBottom] + AnchorSideTop.Control = editRepeatPassword + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 20 + Top = 140 + Width = 57 + BorderSpacing.Around = 6 Caption = 'lblStatus' end object editPassword: TEdit - Left = 182 - Height = 21 - Top = 50 - Width = 264 - Anchors = [akLeft, akRight, akBottom] + AnchorSideTop.Control = lblHeading + AnchorSideTop.Side = asrBottom + Left = 226 + Height = 28 + Top = 72 + Width = 333 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 TabOrder = 0 TextHint = 'Type new password or select a suggestion' OnChange = editPasswordChange @@ -64,11 +74,14 @@ object frmPasswordChange: TfrmPasswordChange OnKeyDown = editPasswordKeyDown end object editRepeatPassword: TEdit - Left = 182 - Height = 21 - Top = 84 - Width = 264 - Anchors = [akLeft, akRight, akBottom] + AnchorSideTop.Control = editPassword + AnchorSideTop.Side = asrBottom + Left = 226 + Height = 28 + Top = 106 + Width = 333 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 EchoMode = emPassword PasswordChar = '*' TabOrder = 1 @@ -78,10 +91,10 @@ object frmPasswordChange: TfrmPasswordChange OnKeyDown = editPasswordKeyDown end object btnCancel: TButton - Left = 251 + Left = 313 Height = 31 - Top = 146 - Width = 94 + Top = 189 + Width = 120 Anchors = [akRight, akBottom] Cancel = True Caption = 'Cancel' @@ -89,10 +102,10 @@ object frmPasswordChange: TfrmPasswordChange TabOrder = 2 end object btnOK: TButton - Left = 152 + Left = 187 Height = 31 - Top = 146 - Width = 94 + Top = 189 + Width = 120 Anchors = [akRight, akBottom] Caption = 'OK' Default = True @@ -100,25 +113,29 @@ object frmPasswordChange: TfrmPasswordChange TabOrder = 3 end object btnCopyToClipboard: TButton - Left = 352 + Left = 443 Height = 31 - Top = 146 - Width = 94 + Top = 189 + Width = 120 Anchors = [akRight, akBottom] Caption = 'Copy' TabOrder = 4 OnClick = btnCopyToClipboardClick end object progressbarPasswordStrength: TProgressBar - Left = 182 + AnchorSideTop.Control = editRepeatPassword + AnchorSideTop.Side = asrBottom + Left = 226 Height = 21 - Top = 164 - Width = 378 + Top = 140 + Width = 333 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 TabOrder = 5 end object popupPassword: TPopupMenu - Left = 430 - Top = 10 + Left = 8 + Top = 168 object N6characters1: TMenuItem Caption = '6 characters' OnClick = menuPasswordClick diff --git a/source/column_selection.lfm b/source/column_selection.lfm index 8879ead0..6a2db72e 100644 --- a/source/column_selection.lfm +++ b/source/column_selection.lfm @@ -15,13 +15,13 @@ object frmColumnSelection: TfrmColumnSelection OnCreate = FormCreate OnDeactivate = FormDeactivate OnShow = FormShow - LCLVersion = '3.8.0.0' object btnCancel: TButton Left = 146 Height = 31 Top = 264 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' ModalResult = 2 @@ -34,47 +34,58 @@ object frmColumnSelection: TfrmColumnSelection Top = 264 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'OK' Default = True TabOrder = 1 OnClick = btnOKClick end object chkSort: TCheckBox + AnchorSideTop.Control = chklistColumns + AnchorSideTop.Side = asrBottom Left = 10 - Height = 22 - Top = 200 + Height = 24 + Top = 198 Width = 230 Anchors = [akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Sort alphabetically' TabOrder = 2 OnClick = PopulateList end object chkSelectAll: TCheckBox + AnchorSideTop.Control = Owner Left = 10 - Height = 22 + Height = 24 Hint = 'Select / Deselect all' - Top = 8 - Width = 34 + Top = 6 + Width = 39 + BorderSpacing.Around = 6 Caption = 'All' TabOrder = 3 OnClick = chkSelectAllClick end object chklistColumns: TCheckListBox + AnchorSideTop.Control = editFilter + AnchorSideTop.Side = asrBottom Left = 10 - Height = 153 - Top = 39 + Height = 152 + Top = 40 Width = 230 Anchors = [akTop, akLeft, akRight, akBottom] - ItemHeight = 21 + BorderSpacing.Around = 6 + ItemHeight = 0 TabOrder = 4 OnClickCheck = chklistColumnsClickCheck end object editFilter: TEditButton + AnchorSideTop.Control = Owner Left = 79 - Height = 26 - Top = 5 + Height = 28 + Top = 6 Width = 161 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Images = MainForm.ImageListIcons8 ImageIndex = 146 @@ -87,11 +98,14 @@ object frmColumnSelection: TfrmColumnSelection TextHint = 'Filter' end object chkShowRowId: TCheckBox + AnchorSideTop.Control = chkSort + AnchorSideTop.Side = asrBottom Left = 10 - Height = 22 - Top = 229 + Height = 24 + Top = 227 Width = 230 Anchors = [akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Show static row id column' TabOrder = 6 end diff --git a/source/copytable.lfm b/source/copytable.lfm index 1ecc672a..524218b4 100644 --- a/source/copytable.lfm +++ b/source/copytable.lfm @@ -14,32 +14,43 @@ object CopyTableForm: TCopyTableForm OnShow = FormShow Position = poMainFormCenter object lblNewTablename: TLabel + AnchorSideTop.Control = Owner Left = 10 - Height = 18 - Top = 10 - Width = 183 + Height = 20 + Top = 6 + Width = 179 + BorderSpacing.Around = 6 Caption = 'Copy "%s" to new db.table:' end object lblItems: TLabel + AnchorSideTop.Control = editNewTablename + AnchorSideTop.Side = asrBottom Left = 10 - Height = 18 - Top = 64 - Width = 210 + Height = 20 + Top = 66 + Width = 211 + BorderSpacing.Around = 6 Caption = 'Elements to create in new table:' end object lblWhere: TLabel + AnchorSideTop.Side = asrBottom + AnchorSideBottom.Control = MemoFilter Left = 10 - Height = 18 - Top = 207 - Width = 210 + Height = 20 + Top = 216 + Width = 212 Anchors = [akLeft, akBottom] + BorderSpacing.Around = 6 Caption = 'WHERE clause for data copying:' end object editNewTablename: TEdit + AnchorSideTop.Control = lblNewTablename + AnchorSideTop.Side = asrBottom Left = 199 - Height = 26 - Top = 30 + Height = 28 + Top = 32 Width = 246 + BorderSpacing.Around = 6 TabOrder = 1 OnChange = editNewTablenameChange end @@ -55,11 +66,14 @@ object CopyTableForm: TCopyTableForm TabOrder = 5 end object comboDatabase: TComboBox + AnchorSideTop.Control = lblNewTablename + AnchorSideTop.Side = asrBottom Left = 10 - Height = 26 - Top = 30 + Height = 28 + Top = 32 Width = 181 - ItemHeight = 18 + BorderSpacing.Around = 6 + ItemHeight = 20 Style = csDropDownList TabOrder = 0 end @@ -76,11 +90,14 @@ object CopyTableForm: TCopyTableForm OnClick = btnOKClick end object TreeElements: TLazVirtualStringTree + AnchorSideTop.Control = lblItems + AnchorSideTop.Side = asrBottom Left = 10 - Height = 110 - Top = 88 + Height = 106 + Top = 92 Width = 435 Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Header.AutoSizeIndex = 0 Header.Columns = <> Header.MainColumn = -1 @@ -96,10 +113,12 @@ object CopyTableForm: TCopyTableForm OnInitNode = TreeElementsInitNode end inline MemoFilter: TSynEdit + AnchorSideBottom.Control = btnOK Left = 10 Height = 91 - Top = 240 + Top = 242 Width = 435 + BorderSpacing.Around = 6 Anchors = [akLeft, akRight, akBottom] Font.Color = clGrayText Font.Height = -16 @@ -177,11 +196,14 @@ object CopyTableForm: TCopyTableForm end end object btnRecentFilters: TSpeedButton + AnchorSideTop.Side = asrBottom + AnchorSideBottom.Control = MemoFilter Left = 310 Height = 28 - Top = 204 + Top = 208 Width = 135 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Recent filters' Images = MainForm.ImageListIcons8 ImageIndex = 108 diff --git a/source/createdatabase.lfm b/source/createdatabase.lfm index 6b369c6c..89672e2b 100644 --- a/source/createdatabase.lfm +++ b/source/createdatabase.lfm @@ -14,87 +14,112 @@ object CreateDatabaseForm: TCreateDatabaseForm OnShow = FormShow Position = poOwnerFormCenter object lblDBName: TLabel + AnchorSideTop.Control = Owner Left = 10 - Height = 18 - Top = 24 - Width = 44 + Height = 20 + Top = 6 + Width = 43 + BorderSpacing.Around = 6 Caption = '&Name:' FocusControl = editDBName end object lblCollation: TLabel + AnchorSideTop.Control = editDBName + AnchorSideTop.Side = asrBottom Left = 10 - Height = 18 - Top = 56 - Width = 57 + Height = 20 + Top = 40 + Width = 63 + BorderSpacing.Around = 6 Caption = 'C&ollation:' FocusControl = comboCollation end object lblCreateCode: TLabel + AnchorSideTop.Control = btnOK + AnchorSideTop.Side = asrBottom Left = 10 - Height = 18 - Top = 166 + Height = 20 + Top = 137 Width = 81 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'CREATE code' end object lblServerDefaultCollation: TLabel + AnchorSideTop.Control = comboCollation + AnchorSideTop.Side = asrBottom Left = 120 - Height = 18 - Top = 86 + Height = 20 + Top = 74 Width = 103 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Servers default:' end object editDBName: TEdit + AnchorSideTop.Control = Owner Left = 120 - Height = 26 - Top = 20 + Height = 28 + Top = 6 Width = 266 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 TabOrder = 0 TextHint = 'Enter database name' OnChange = Modified end object btnOK: TButton + AnchorSideTop.Control = lblServerDefaultCollation + AnchorSideTop.Side = asrBottom Left = 191 Height = 31 - Top = 116 + Top = 100 Width = 94 Anchors = [akTop, akRight] + BorderSpacing.Around = 6 Caption = 'OK' Default = True TabOrder = 2 OnClick = btnOKClick end object btnCancel: TButton + AnchorSideTop.Control = lblServerDefaultCollation + AnchorSideTop.Side = asrBottom Left = 292 Height = 31 - Top = 116 + Top = 100 Width = 94 Anchors = [akTop, akRight] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' ModalResult = 2 TabOrder = 3 end object comboCollation: TComboBox + AnchorSideTop.Control = editDBName + AnchorSideTop.Side = asrBottom Left = 120 - Height = 26 - Top = 52 + Height = 28 + Top = 40 Width = 266 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 DropDownCount = 16 - ItemHeight = 18 + ItemHeight = 20 Sorted = True Style = csDropDownList TabOrder = 1 OnChange = Modified end inline SynMemoCreateCode: TSynEdit + AnchorSideTop.Control = lblCreateCode + AnchorSideTop.Side = asrBottom Left = 10 - Height = 84 - Top = 190 + Height = 111 + Top = 163 Width = 376 + BorderSpacing.Around = 6 Anchors = [akTop, akLeft, akRight, akBottom] Font.Color = clWindowText Font.Height = -16 diff --git a/source/csv_detector.lfm b/source/csv_detector.lfm index dd24040d..574089a6 100644 --- a/source/csv_detector.lfm +++ b/source/csv_detector.lfm @@ -12,18 +12,23 @@ object frmCsvDetector: TfrmCsvDetector OnShow = FormShow Position = poOwnerFormCenter object btnScan: TSpeedButton + AnchorSideTop.Control = Owner Left = 10 Height = 31 - Top = 10 + Top = 6 Width = 141 + BorderSpacing.Around = 6 Caption = 'Scan file...' OnClick = btnScanClick end inline SynMemoCreateTable: TSynEdit + AnchorSideTop.Control = btnScan + AnchorSideTop.Side = asrBottom Left = 10 - Height = 301 - Top = 49 + Height = 307 + Top = 43 Width = 657 + BorderSpacing.Around = 6 Anchors = [akTop, akLeft, akRight, akBottom] Font.Color = clWindowText Font.Height = -16 @@ -32,7 +37,7 @@ object frmCsvDetector: TfrmCsvDetector Font.Quality = fqNonAntialiased ParentColor = False ParentFont = False - TabOrder = 1 + TabOrder = 0 Gutter.Width = 72 Gutter.MouseActions = <> RightGutter.Width = 0 @@ -103,6 +108,7 @@ object frmCsvDetector: TfrmCsvDetector Top = 358 Width = 152 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' ModalResult = 2 @@ -114,10 +120,10 @@ object frmCsvDetector: TfrmCsvDetector Top = 358 Width = 152 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Ok, create table' - Default = True ModalResult = 1 - TabOrder = 3 + TabOrder = 1 OnClick = btnSaveClick end object TimerStartScan: TTimer diff --git a/source/csv_detector.pas b/source/csv_detector.pas index c5813beb..c23e48a2 100644 --- a/source/csv_detector.pas +++ b/source/csv_detector.pas @@ -160,7 +160,7 @@ begin ProgressCharsPerStep := ContentLen div FLoadDataFrm.ProgressBarSteps; ProgressChars := 0; MainForm.EnableProgress(FLoadDataFrm.ProgressBarSteps); - IgnoreLines := FLoadDataFrm.updownIgnoreLines.Position; + IgnoreLines := StrToIntDef(FLoadDataFrm.editIgnoreLines.Text, 0); NextChar; while P <= ContentLen do begin diff --git a/source/customize_highlighter.lfm b/source/customize_highlighter.lfm index e27049cb..728e4465 100644 --- a/source/customize_highlighter.lfm +++ b/source/customize_highlighter.lfm @@ -17,31 +17,42 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter OnShow = FormShow Position = poOwnerFormCenter object lblBackground: TLabel + AnchorSideTop.Control = comboHighlighter + AnchorSideTop.Side = asrBottom Left = 199 Height = 20 - Top = 46 + Top = 40 Width = 82 + BorderSpacing.Around = 6 Caption = 'Background:' end object lblForeground: TLabel + AnchorSideTop.Control = editBackground + AnchorSideTop.Side = asrBottom Left = 199 Height = 20 - Top = 81 + Top = 74 Width = 80 + BorderSpacing.Around = 6 Caption = 'Foreground:' end object lblStyle: TLabel + AnchorSideTop.Control = editForeground + AnchorSideTop.Side = asrBottom Left = 199 Height = 20 - Top = 112 + Top = 108 Width = 35 + BorderSpacing.Around = 6 Caption = 'Style:' end object comboHighlighter: TComboBox + AnchorSideTop.Control = Owner Left = 10 Height = 28 - Top = 10 + Top = 6 Width = 181 + BorderSpacing.Around = 6 ItemHeight = 20 Sorted = True Style = csDropDownList @@ -49,30 +60,39 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter OnSelect = comboHighlighterSelect end object listboxAttributes: TListBox + AnchorSideTop.Control = comboHighlighter + AnchorSideTop.Side = asrBottom Left = 10 Height = 216 - Top = 46 + Top = 40 Width = 181 + BorderSpacing.Around = 6 ItemHeight = 0 TabOrder = 1 OnClick = listboxAttributesClick end object chkBold: TCheckBox + AnchorSideTop.Control = editForeground + AnchorSideTop.Side = asrBottom Left = 346 Height = 24 - Top = 112 + Top = 108 Width = 195 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Bold' TabOrder = 4 OnClick = Modified end object chkItalic: TCheckBox + AnchorSideTop.Control = chkBold + AnchorSideTop.Side = asrBottom Left = 346 Height = 24 - Top = 141 + Top = 138 Width = 195 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Italic' TabOrder = 5 OnClick = Modified @@ -83,6 +103,7 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter Top = 270 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' ModalResult = 2 @@ -94,6 +115,7 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter Top = 270 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'OK' Default = True ModalResult = 1 @@ -101,11 +123,14 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter OnClick = SaveSettings end object editBackground: TEditButton + AnchorSideTop.Control = comboHighlighter + AnchorSideTop.Side = asrBottom Left = 346 Height = 28 - Top = 42 + Top = 40 Width = 195 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonHint = 'Color picker' ButtonWidth = 29 Images = MainForm.ImageListIcons8 @@ -118,11 +143,14 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter TabOrder = 2 end object editForeground: TEditButton + AnchorSideTop.Control = editBackground + AnchorSideTop.Side = asrBottom Left = 346 Height = 28 - Top = 78 + Top = 74 Width = 195 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonHint = 'Color picker' ButtonWidth = 29 Images = MainForm.ImageListIcons8 @@ -140,6 +168,7 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter Top = 270 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Apply' TabOrder = 8 OnClick = SaveSettings diff --git a/source/editvar.lfm b/source/editvar.lfm index 7cb8caef..68d4222a 100644 --- a/source/editvar.lfm +++ b/source/editvar.lfm @@ -20,6 +20,7 @@ object frmEditVariable: TfrmEditVariable Top = 237 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'OK' Default = True ModalResult = 1 @@ -32,133 +33,151 @@ object frmEditVariable: TfrmEditVariable Top = 237 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' ModalResult = 2 TabOrder = 1 end object grpScope: TGroupBox + AnchorSideTop.Control = gbValue + AnchorSideTop.Side = asrBottom Left = 10 Height = 51 Top = 178 Width = 344 Anchors = [akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Scope' - ClientHeight = 28 + ClientHeight = 26 ClientWidth = 340 ParentBackground = False TabOrder = 2 object radioScopeSession: TRadioButton Left = 8 - Height = 22 + Height = 24 Top = 0 - Width = 100 + Width = 98 Caption = 'This session' TabOrder = 0 end object radioScopeGlobal: TRadioButton Left = 140 - Height = 22 + Height = 24 Top = 0 - Width = 59 + Width = 65 Caption = 'Global' TabOrder = 1 end end object gbValue: TGroupBox + AnchorSideTop.Control = Owner Left = 10 - Height = 160 - Top = 10 + Height = 164 + Top = 6 Width = 344 Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'name of variable' - ClientHeight = 137 + ClientHeight = 139 ClientWidth = 340 ParentBackground = False TabOrder = 3 object lblString: TLabel Left = 10 - Height = 18 + Height = 20 Top = 8 - Width = 41 + Width = 42 + BorderSpacing.Around = 6 Caption = 'String:' end object lblNumber: TLabel + AnchorSideTop.Control = editString + AnchorSideTop.Side = asrBottom Left = 10 - Height = 18 - Top = 42 + Height = 20 + Top = 39 Width = 57 + BorderSpacing.Around = 6 Caption = 'Number:' end object lblEnum: TLabel + AnchorSideTop.Control = editNumber + AnchorSideTop.Side = asrBottom Left = 10 - Height = 18 - Top = 76 - Width = 86 + Height = 20 + Top = 73 + Width = 87 + BorderSpacing.Around = 6 Caption = 'Enumeration:' end object lblBoolean: TLabel + AnchorSideTop.Control = comboEnum + AnchorSideTop.Side = asrBottom Left = 10 - Height = 18 + Height = 20 Top = 107 - Width = 56 + Width = 58 + BorderSpacing.Around = 6 Caption = 'Boolean:' end object radioBooleanOn: TRadioButton + AnchorSideTop.Control = comboEnum + AnchorSideTop.Side = asrBottom Left = 110 - Height = 22 - Top = 106 + Height = 24 + Top = 107 Width = 40 + BorderSpacing.Around = 6 Caption = 'On' TabOrder = 0 end object radioBooleanOff: TRadioButton + AnchorSideTop.Control = comboEnum + AnchorSideTop.Side = asrBottom Left = 220 - Height = 22 - Top = 106 + Height = 24 + Top = 107 Width = 110 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Off' TabOrder = 1 end object comboEnum: TComboBox + AnchorSideTop.Control = editNumber + AnchorSideTop.Side = asrBottom Left = 110 - Height = 26 - Top = 72 + Height = 28 + Top = 73 Width = 221 Anchors = [akTop, akLeft, akRight] - ItemHeight = 18 + BorderSpacing.Around = 6 + ItemHeight = 20 Style = csDropDownList TabOrder = 2 end object editNumber: TEdit + AnchorSideTop.Control = editString + AnchorSideTop.Side = asrBottom Left = 110 - Height = 26 - Top = 38 - Width = 200 + Height = 28 + Top = 39 + Width = 221 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 + NumbersOnly = True TabOrder = 3 Text = '0' end - object UpDownNumber: TUpDown - Left = 310 - Height = 26 - Top = 38 - Width = 20 - Anchors = [akTop, akRight] - Associate = editNumber - Max = 32767 - Min = -32768 - Position = 0 - TabOrder = 4 - end object editString: TEdit Left = 110 - Height = 26 + Height = 28 Top = 5 Width = 221 Anchors = [akTop, akLeft, akRight] - TabOrder = 5 + BorderSpacing.Around = 6 + TabOrder = 4 end end object btnHelp: TButton @@ -167,6 +186,7 @@ object frmEditVariable: TfrmEditVariable Top = 237 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Help' TabOrder = 4 OnClick = btnHelpClick diff --git a/source/editvar.pas b/source/editvar.pas index bc3de865..4e9ba0f1 100644 --- a/source/editvar.pas +++ b/source/editvar.pas @@ -23,7 +23,6 @@ type radioBooleanOff: TRadioButton; comboEnum: TComboBox; editNumber: TEdit; - UpDownNumber: TUpDown; editString: TEdit; lblString: TLabel; lblNumber: TLabel; @@ -110,7 +109,6 @@ begin editString.Enabled := FVarType = vtString; lblNumber.Enabled := FVarType = vtNumeric; editNumber.Enabled := FVarType = vtNumeric; - UpDownNumber.Enabled := FVarType = vtNumeric; lblEnum.Enabled := FVarType = vtEnum; comboEnum.Enabled := FVarType = vtEnum; lblBoolean.Enabled := FVarType = vtBoolean; @@ -124,7 +122,7 @@ begin editString.SetFocus; end; vtNumeric: begin - UpDownNumber.Position := MakeInt(FVarValue); + editNumber.Text := FVarValue; editNumber.SelectAll; editNumber.SetFocus; end; @@ -173,7 +171,7 @@ begin Conn := MainForm.ActiveConnection; case FVarType of - vtNumeric: val := IntToStr(UpDownNumber.Position); + vtNumeric: val := editNumber.Text; vtString: begin // Various variables are int64 or float, for which we have no specific // editor other than the string editor. Do not quote these to avoid diff --git a/source/exportgrid.lfm b/source/exportgrid.lfm index 991d0504..e4b1351d 100644 --- a/source/exportgrid.lfm +++ b/source/exportgrid.lfm @@ -15,13 +15,13 @@ object frmExportGrid: TfrmExportGrid OnCreate = FormCreate OnShow = FormShow Position = poMainFormCenter - LCLVersion = '3.8.0.0' object btnOK: TButton Left = 425 Height = 31 Top = 474 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'OK' Default = True ModalResult = 1 @@ -34,18 +34,22 @@ object frmExportGrid: TfrmExportGrid Top = 474 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' ModalResult = 2 TabOrder = 4 end object grpSelection: TRadioGroup + AnchorSideTop.Control = grpFormat + AnchorSideTop.Side = asrBottom Left = 10 Height = 82 - Top = 210 + Top = 202 Width = 610 Anchors = [akTop, akLeft, akRight] AutoFill = True + BorderSpacing.Around = 6 Caption = 'Row selection' ChildSizing.LeftRightSpacing = 6 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize @@ -54,7 +58,7 @@ object frmExportGrid: TfrmExportGrid ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 59 + ClientHeight = 57 ClientWidth = 606 ItemIndex = 1 Items.Strings = ( @@ -65,29 +69,35 @@ object frmExportGrid: TfrmExportGrid TabOrder = 2 end object grpOutput: TGroupBox + AnchorSideTop.Control = Owner Left = 10 Height = 122 - Top = 10 + Top = 6 Width = 610 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Output target' - ClientHeight = 99 + ClientHeight = 97 ClientWidth = 606 ParentBackground = False TabOrder = 0 object lblEncoding: TLabel + AnchorSideTop.Control = editFilename + AnchorSideTop.Side = asrBottom Left = 10 - Height = 18 - Top = 70 - Width = 62 + Height = 20 + Top = 66 + Width = 65 + BorderSpacing.Around = 6 Caption = 'Encoding:' end object radioOutputCopyToClipboard: TRadioButton Left = 10 - Height = 22 + Height = 24 Top = 2 Width = 584 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Copy to clipboard' Checked = True TabOrder = 0 @@ -95,20 +105,26 @@ object frmExportGrid: TfrmExportGrid OnClick = ValidateControls end object radioOutputFile: TRadioButton + AnchorSideTop.Control = radioOutputCopyToClipboard + AnchorSideTop.Side = asrBottom Left = 10 - Height = 22 - Top = 34 - Width = 41 + Height = 24 + Top = 32 + Width = 44 + BorderSpacing.Around = 6 Caption = 'File' TabOrder = 1 OnClick = ValidateControls end object editFilename: TEditButton + AnchorSideTop.Control = radioOutputCopyToClipboard + AnchorSideTop.Side = asrBottom Left = 99 - Height = 26 + Height = 28 Top = 32 Width = 495 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Images = MainForm.ImageListIcons8 ImageIndex = 51 @@ -122,60 +138,77 @@ object frmExportGrid: TfrmExportGrid TextHint = 'Doubleclick to select file' end object comboEncoding: TComboBox + AnchorSideTop.Control = editFilename + AnchorSideTop.Side = asrBottom Left = 99 - Height = 26 + Height = 28 Top = 66 Width = 495 Anchors = [akTop, akLeft, akRight] - ItemHeight = 18 + BorderSpacing.Around = 6 + ItemHeight = 20 Style = csDropDownList TabOrder = 3 end end object grpOptions: TGroupBox + AnchorSideTop.Control = grpSelection + AnchorSideTop.Side = asrBottom Left = 10 - Height = 166 - Top = 300 + Height = 176 + Top = 290 Width = 610 Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Options' - ClientHeight = 143 + ClientHeight = 151 ClientWidth = 606 ParentBackground = False TabOrder = 3 object lblSeparator: TLabel Left = 349 - Height = 18 + Height = 20 Top = 9 - Width = 100 + Width = 102 + BorderSpacing.Around = 6 Caption = 'Field separator:' end object lblEncloser: TLabel + AnchorSideTop.Control = editSeparator + AnchorSideTop.Side = asrBottom Left = 349 - Height = 18 - Top = 42 + Height = 20 + Top = 40 Width = 58 + BorderSpacing.Around = 6 Caption = 'Encloser:' end object lblTerminator: TLabel + AnchorSideTop.Control = editEncloser + AnchorSideTop.Side = asrBottom Left = 349 - Height = 18 - Top = 76 - Width = 102 + Height = 20 + Top = 74 + Width = 104 + BorderSpacing.Around = 6 Caption = 'Line terminator:' end object lblNull: TLabel + AnchorSideTop.Control = editTerminator + AnchorSideTop.Side = asrBottom Left = 349 - Height = 18 + Height = 20 Top = 108 - Width = 78 + Width = 77 + BorderSpacing.Around = 6 Caption = 'NULL value:' end object chkIncludeColumnNames: TCheckBox Left = 10 - Height = 22 + Height = 24 Top = 9 - Width = 168 + Width = 169 + BorderSpacing.Around = 6 Caption = 'Include column names' Checked = True State = cbChecked @@ -183,10 +216,11 @@ object frmExportGrid: TfrmExportGrid end object editSeparator: TEditButton Left = 500 - Height = 26 + Height = 28 Top = 6 Width = 94 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Images = MainForm.ImageListIcons8 ImageIndex = 108 @@ -199,11 +233,14 @@ object frmExportGrid: TfrmExportGrid Text = ';' end object editEncloser: TEditButton + AnchorSideTop.Control = editSeparator + AnchorSideTop.Side = asrBottom Left = 500 - Height = 26 - Top = 38 + Height = 28 + Top = 40 Width = 94 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Images = MainForm.ImageListIcons8 ImageIndex = 108 @@ -215,11 +252,14 @@ object frmExportGrid: TfrmExportGrid TabOrder = 5 end object editTerminator: TEditButton + AnchorSideTop.Control = editEncloser + AnchorSideTop.Side = asrBottom Left = 500 - Height = 26 - Top = 72 + Height = 28 + Top = 74 Width = 94 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Images = MainForm.ImageListIcons8 ImageIndex = 108 @@ -232,27 +272,36 @@ object frmExportGrid: TfrmExportGrid Text = '\r\n' end object chkIncludeAutoIncrement: TCheckBox + AnchorSideTop.Control = editSeparator + AnchorSideTop.Side = asrBottom Left = 10 - Height = 22 - Top = 38 - Width = 222 + Height = 24 + Top = 40 + Width = 226 + BorderSpacing.Around = 6 Caption = 'Include auto increment column' TabOrder = 1 end object chkIncludeQuery: TCheckBox + AnchorSideTop.Control = editEncloser + AnchorSideTop.Side = asrBottom Left = 10 - Height = 22 - Top = 67 - Width = 141 + Height = 24 + Top = 74 + Width = 140 + BorderSpacing.Around = 6 Caption = 'Include SQL query' TabOrder = 2 end object editNull: TEditButton + AnchorSideTop.Control = editTerminator + AnchorSideTop.Side = asrBottom Left = 500 - Height = 26 - Top = 105 + Height = 28 + Top = 108 Width = 94 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Images = MainForm.ImageListIcons8 ImageIndex = 108 @@ -264,10 +313,13 @@ object frmExportGrid: TfrmExportGrid TabOrder = 7 end object chkRemoveLinebreaks: TCheckBox + AnchorSideTop.Control = editTerminator + AnchorSideTop.Side = asrBottom Left = 10 - Height = 22 - Top = 96 - Width = 240 + Height = 24 + Top = 108 + Width = 242 + BorderSpacing.Around = 6 Caption = 'Remove linebreaks from contents' TabOrder = 3 end @@ -278,25 +330,29 @@ object frmExportGrid: TfrmExportGrid Top = 474 Width = 191 Anchors = [akLeft, akBottom] + BorderSpacing.Around = 6 Caption = 'Save clipboard settings' Images = MainForm.ImageListIcons8 ImageIndex = 4 OnClick = btnSetClipboardDefaultsClick end object grpFormat: TGroupBox + AnchorSideTop.Control = grpOutput + AnchorSideTop.Side = asrBottom Left = 10 Height = 62 - Top = 140 + Top = 134 Width = 610 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Output format' - ClientHeight = 39 + ClientHeight = 37 ClientWidth = 606 ParentBackground = False TabOrder = 1 object comboFormat: TComboBoxEx Left = 10 - Height = 28 + Height = 26 Top = 3 Width = 584 Anchors = [akTop, akLeft, akRight] diff --git a/source/insertfiles.lfm b/source/insertfiles.lfm index 23489cb5..d5ccf4ce 100644 --- a/source/insertfiles.lfm +++ b/source/insertfiles.lfm @@ -21,6 +21,7 @@ object frmInsertFiles: TfrmInsertFiles Top = 573 Width = 162 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Import files' Default = True Enabled = False @@ -34,6 +35,7 @@ object frmInsertFiles: TfrmInsertFiles Top = 573 Width = 119 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' ModalResult = 2 @@ -45,6 +47,7 @@ object frmInsertFiles: TfrmInsertFiles Top = 10 Width = 619 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Target table and columns' ClientHeight = 267 ClientWidth = 615 @@ -55,13 +58,17 @@ object frmInsertFiles: TfrmInsertFiles Height = 20 Top = 8 Width = 107 + BorderSpacing.Around = 6 Caption = 'Database, table:' end object lblFilecontents: TLabel + AnchorSideTop.Control = comboDBs + AnchorSideTop.Side = asrBottom Left = 12 Height = 20 - Top = 42 + Top = 39 Width = 515 + BorderSpacing.Around = 6 Caption = 'Column values (Hint: Assign "%filecontent%" value to a BLOB or TEXT column)' end object comboDBs: TComboBox @@ -69,6 +76,7 @@ object frmInsertFiles: TfrmInsertFiles Height = 28 Top = 5 Width = 189 + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList TabOrder = 0 @@ -80,17 +88,21 @@ object frmInsertFiles: TfrmInsertFiles Top = 5 Width = 195 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList TabOrder = 1 OnChange = comboTablesChange end object ListColumns: TLazVirtualStringTree + AnchorSideTop.Control = lblFilecontents + AnchorSideTop.Side = asrBottom Left = 12 Height = 189 - Top = 66 + Top = 65 Width = 592 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 EditDelay = 0 Header.AutoSizeIndex = 2 Header.Columns = < @@ -135,6 +147,7 @@ object frmInsertFiles: TfrmInsertFiles Top = 310 Width = 619 Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Files to import' ClientHeight = 230 ClientWidth = 615 @@ -147,23 +160,31 @@ object frmInsertFiles: TfrmInsertFiles Width = 290 Anchors = [akTop, akLeft, akRight] AutoSize = False + BorderSpacing.Around = 6 Caption = 'Hint: You can drop files from your Windows Explorer onto the list.' Layout = tlCenter end object lblFileCount: TLabel + AnchorSideTop.Control = ListFiles + AnchorSideTop.Side = asrBottom Left = 12 Height = 20 Top = 195 Width = 39 Anchors = [akLeft, akBottom] + BorderSpacing.Around = 6 Caption = '0 files' end object ListFiles: TLazVirtualStringTree + AnchorSideTop.Control = ToolBar1 + AnchorSideTop.Side = asrBottom + AnchorSideBottom.Control = lblFileCount Left = 12 - Height = 135 + Height = 138 Top = 51 Width = 592 Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Header.AutoSizeIndex = 0 Header.Columns = < item @@ -213,6 +234,7 @@ object frmInsertFiles: TfrmInsertFiles Top = 17 Width = 290 Align = alNone + BorderSpacing.Around = 6 ButtonHeight = 35 ButtonWidth = 82 Caption = 'ToolBarFiles' diff --git a/source/loaddata.lfm b/source/loaddata.lfm index f218ca83..a73d149b 100644 --- a/source/loaddata.lfm +++ b/source/loaddata.lfm @@ -45,32 +45,38 @@ object loaddataform: Tloaddataform Top = 10 Width = 632 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Input file' - ClientHeight = 74 + ClientHeight = 72 ClientWidth = 628 ParentBackground = False TabOrder = 0 object lblFilename: TLabel Left = 12 - Height = 18 + Height = 20 Top = 4 - Width = 62 + Width = 63 + BorderSpacing.Around = 6 Caption = 'Filename:' FocusControl = editFilename end object lblEncoding: TLabel + AnchorSideTop.Control = editFilename + AnchorSideTop.Side = asrBottom Left = 12 - Height = 18 - Top = 38 - Width = 62 + Height = 20 + Top = 34 + Width = 65 + BorderSpacing.Around = 6 Caption = 'Encoding:' end object editFilename: TEditButton Left = 110 - Height = 26 + Height = 28 Top = 0 Width = 506 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Images = MainForm.ImageListIcons8 ImageIndex = 51 @@ -84,13 +90,16 @@ object loaddataform: Tloaddataform Text = 'editFilename' end object comboEncoding: TComboBox + AnchorSideTop.Control = editFilename + AnchorSideTop.Side = asrBottom Left = 110 - Height = 26 + Height = 28 Top = 34 Width = 506 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 DropDownCount = 16 - ItemHeight = 18 + ItemHeight = 20 Sorted = True Style = csDropDownList TabOrder = 1 @@ -102,79 +111,103 @@ object loaddataform: Tloaddataform Top = 122 Width = 364 Anchors = [akTop, akRight] + BorderSpacing.Around = 6 Caption = 'Control characters' - ClientHeight = 146 + ClientHeight = 144 ClientWidth = 360 ParentBackground = False TabOrder = 2 object lblFieldTerminater: TLabel Left = 12 - Height = 18 + Height = 20 Top = 15 - Width = 131 + Width = 135 + BorderSpacing.Around = 6 Caption = 'Fields terminated by' end object lblFieldEncloser: TLabel + AnchorSideTop.Control = editFieldTerminator + AnchorSideTop.Side = asrBottom Left = 12 - Height = 18 - Top = 47 - Width = 117 + Height = 20 + Top = 46 + Width = 121 + BorderSpacing.Around = 6 Caption = 'Fields enclosed by' end object lblFieldEscaper: TLabel + AnchorSideTop.Control = editFieldEncloser + AnchorSideTop.Side = asrBottom Left = 12 - Height = 18 - Top = 77 - Width = 115 + Height = 20 + Top = 80 + Width = 117 + BorderSpacing.Around = 6 Caption = 'Fields escaped by' end object lblLineTerminator: TLabel + AnchorSideTop.Control = editFieldEscaper + AnchorSideTop.Side = asrBottom Left = 12 - Height = 18 - Top = 108 - Width = 128 + Height = 20 + Top = 114 + Width = 130 + BorderSpacing.Around = 6 Caption = 'Lines terminated by' end object editFieldEscaper: TEdit + AnchorSideTop.Control = editFieldEncloser + AnchorSideTop.Side = asrBottom Left = 181 - Height = 26 - Top = 73 + Height = 28 + Top = 80 Width = 61 + BorderSpacing.Around = 6 TabOrder = 3 Text = '"' end object editFieldEncloser: TEdit + AnchorSideTop.Control = editFieldTerminator + AnchorSideTop.Side = asrBottom Left = 181 - Height = 26 - Top = 43 + Height = 28 + Top = 46 Width = 61 + BorderSpacing.Around = 6 TabOrder = 1 Text = '"' end object editFieldTerminator: TEdit Left = 181 - Height = 26 + Height = 28 Top = 12 Width = 61 + BorderSpacing.Around = 6 TabOrder = 0 Text = ';' end object chkFieldsEnclosedOptionally: TCheckBox + AnchorSideTop.Control = editFieldTerminator + AnchorSideTop.Side = asrBottom Left = 250 - Height = 22 - Top = 45 + Height = 24 + Top = 46 Width = 106 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'optionally' Checked = True State = cbChecked TabOrder = 2 end object editLineTerminator: TEdit + AnchorSideTop.Control = editFieldEscaper + AnchorSideTop.Side = asrBottom Left = 181 - Height = 26 - Top = 104 + Height = 28 + Top = 114 Width = 61 + BorderSpacing.Around = 6 TabOrder = 4 Text = '\r\n' end @@ -185,81 +218,87 @@ object loaddataform: Tloaddataform Top = 122 Width = 261 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Options' - ClientHeight = 196 + ClientHeight = 194 ClientWidth = 257 ParentBackground = False TabOrder = 1 object lblIgnoreLinesCount: TLabel Left = 179 - Height = 18 + Height = 20 Top = 12 - Width = 27 + Width = 30 + BorderSpacing.Around = 6 Caption = 'lines' end object lblIgnoreLines: TLabel Left = 12 - Height = 18 + Height = 20 Top = 12 Width = 72 + BorderSpacing.Around = 6 Caption = 'Ignore first' end - object updownIgnoreLines: TUpDown - Left = 151 - Height = 26 - Top = 9 - Width = 20 - Associate = editIgnoreLines - Max = 32767 - Min = 0 - Position = 1 - TabOrder = 1 - end object editIgnoreLines: TEdit Left = 110 - Height = 26 + Height = 28 Top = 9 - Width = 41 + Width = 58 + BorderSpacing.Around = 6 + NumbersOnly = True TabOrder = 0 Text = '1' end object chkLowPriority: TCheckBox + AnchorSideTop.Control = editIgnoreLines + AnchorSideTop.Side = asrBottom Left = 12 - Height = 22 - Top = 44 + Height = 24 + Top = 43 Width = 241 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Low priority, avoid high server load' Checked = True State = cbChecked - TabOrder = 2 + TabOrder = 1 end object chkLocalNumbers: TCheckBox + AnchorSideTop.Control = chkLowPriority + AnchorSideTop.Side = asrBottom Left = 12 - Height = 22 - Top = 68 + Height = 24 + Top = 73 Width = 241 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Input file contains local formatted numbers, e.g. 1.234,56 in Germany' - TabOrder = 3 + TabOrder = 2 end object chkTruncateTable: TCheckBox + AnchorSideTop.Control = chkLocalNumbers + AnchorSideTop.Side = asrBottom Left = 12 - Height = 22 - Top = 115 + Height = 24 + Top = 103 Width = 241 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Truncate destination table before import' - TabOrder = 4 + TabOrder = 3 end object chkKeepDialogOpen: TCheckBox + AnchorSideTop.Control = chkTruncateTable + AnchorSideTop.Side = asrBottom Left = 12 - Height = 22 - Top = 152 + Height = 24 + Top = 133 Width = 241 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Keep dialog open after import' - TabOrder = 5 + TabOrder = 4 end end object grpDuplicates: TRadioGroup @@ -269,6 +308,7 @@ object loaddataform: Tloaddataform Width = 261 Anchors = [akTop, akLeft, akRight] AutoFill = True + BorderSpacing.Around = 6 Caption = 'Handling of duplicate rows' ChildSizing.LeftRightSpacing = 6 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize @@ -277,7 +317,7 @@ object loaddataform: Tloaddataform ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 131 + ClientHeight = 129 ClientWidth = 257 ItemIndex = 2 Items.Strings = ( @@ -295,6 +335,7 @@ object loaddataform: Tloaddataform Width = 261 Anchors = [akTop, akLeft, akRight, akBottom] AutoFill = True + BorderSpacing.Around = 6 Caption = 'Method' ChildSizing.LeftRightSpacing = 6 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize @@ -303,7 +344,7 @@ object loaddataform: Tloaddataform ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 104 + ClientHeight = 102 ClientWidth = 257 ItemIndex = 0 Items.Strings = ( @@ -320,70 +361,88 @@ object loaddataform: Tloaddataform Top = 299 Width = 364 Anchors = [akTop, akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Destination' - ClientHeight = 315 + ClientHeight = 313 ClientWidth = 360 ParentBackground = False TabOrder = 5 object lblDatabase: TLabel Left = 12 - Height = 18 + Height = 20 Top = 11 - Width = 67 + Width = 66 + BorderSpacing.Around = 6 Caption = 'Database:' end object lblTable: TLabel + AnchorSideTop.Control = comboDatabase + AnchorSideTop.Side = asrBottom Left = 12 - Height = 18 + Height = 20 Top = 41 - Width = 41 + Width = 38 + BorderSpacing.Around = 6 Caption = 'Table:' end object lblColumns: TLabel + AnchorSideTop.Control = comboTable + AnchorSideTop.Side = asrBottom Left = 12 - Height = 18 - Top = 71 + Height = 20 + Top = 75 Width = 60 + BorderSpacing.Around = 6 Caption = 'Columns:' end object comboDatabase: TComboBox Left = 140 - Height = 26 + Height = 28 Top = 7 Width = 208 Anchors = [akTop, akLeft, akRight] - ItemHeight = 18 + BorderSpacing.Around = 6 + ItemHeight = 20 Style = csDropDownList TabOrder = 0 OnChange = comboDatabaseChange end object comboTable: TComboBox + AnchorSideTop.Control = comboDatabase + AnchorSideTop.Side = asrBottom Left = 140 - Height = 26 - Top = 37 + Height = 28 + Top = 41 Width = 208 Anchors = [akTop, akLeft, akRight] - ItemHeight = 18 + BorderSpacing.Around = 6 + ItemHeight = 20 Style = csDropDownList TabOrder = 1 OnChange = comboTableChange end object chklistColumns: TCheckListBox + AnchorSideTop.Control = comboTable + AnchorSideTop.Side = asrBottom Left = 140 - Height = 233 - Top = 71 + Height = 227 + Top = 75 Width = 204 Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 ItemHeight = 0 TabOrder = 2 OnClick = chklistColumnsClick end object ToolBarColMove: TToolBar + AnchorSideTop.Control = lblColumns + AnchorSideTop.Side = asrBottom Left = 12 Height = 82 - Top = 95 + Top = 101 Width = 109 Align = alNone + BorderSpacing.Around = 6 ButtonHeight = 35 ButtonWidth = 74 Caption = 'ToolBarColMove' diff --git a/source/loaddata.pas b/source/loaddata.pas index f81a12a6..aa07d969 100644 --- a/source/loaddata.pas +++ b/source/loaddata.pas @@ -40,7 +40,6 @@ type chkFieldsEnclosedOptionally: TCheckBox; grpOptions: TGroupBox; lblIgnoreLinesCount: TLabel; - updownIgnoreLines: TUpDown; editIgnoreLines: TEdit; editLineTerminator: TEdit; lblLineTerminator: TLabel; @@ -104,7 +103,7 @@ begin editLineTerminator.Text := AppSettings.ReadString(asCSVImportTerminator); chkFieldsEnclosedOptionally.Checked := AppSettings.ReadBool(asCSVImportFieldsEnclosedOptionally); editFieldEscaper.Text := AppSettings.ReadString(asCSVImportFieldEscaper); - updownIgnoreLines.Position := AppSettings.ReadInt(asCSVImportIgnoreLines); + editIgnoreLines.Text := AppSettings.ReadInt(asCSVImportIgnoreLines).ToString; chkLowPriority.Checked := AppSettings.ReadBool(asCSVImportLowPriority); chkLocalNumbers.Checked := AppSettings.ReadBool(asCSVImportLocalNumbers); chkKeepDialogOpen.Checked := AppSettings.ReadBool(asCSVKeepDialogOpen); @@ -173,7 +172,7 @@ begin AppSettings.WriteString(asCSVImportTerminator, editLineTerminator.Text); AppSettings.WriteBool(asCSVImportFieldsEnclosedOptionally, chkFieldsEnclosedOptionally.Checked); AppSettings.WriteString(asCSVImportFieldEscaper, editFieldEscaper.Text); - AppSettings.WriteInt(asCSVImportIgnoreLines, updownIgnoreLines.Position); + AppSettings.WriteInt(asCSVImportIgnoreLines, StrToIntDef(editIgnoreLines.Text, 0)); AppSettings.WriteBool(asCSVImportLowPriority, chkLowPriority.Checked); AppSettings.WriteBool(asCSVImportLocalNumbers, chkLocalNumbers.Checked); AppSettings.WriteBool(asCSVKeepDialogOpen, chkKeepDialogOpen.Checked); @@ -425,8 +424,8 @@ begin // Lines: if FLineTerm <> '' then SQL := SQL + 'LINES TERMINATED BY ' + FConnection.EscapeString(FLineTerm) + ' '; - if updownIgnoreLines.Position > 0 then - SQL := SQL + 'IGNORE ' + inttostr(updownIgnoreLines.Position) + ' LINES '; + if editIgnoreLines.Text <> '' then + SQL := SQL + 'IGNORE ' + editIgnoreLines.Text + ' LINES '; // Column listing SQL := SQL + '('; @@ -613,7 +612,7 @@ begin FRowCount := 0; LineNum := 0; RowCountInChunk := 0; - IgnoreLines := UpDownIgnoreLines.Position; + IgnoreLines := StrToIntDef(editIgnoreLines.Text, 0); ValueCount := 0; PacketSize := SIZE_MB div 2; NextChar; diff --git a/source/main.lfm b/source/main.lfm index 9d486e56..3e31429e 100644 --- a/source/main.lfm +++ b/source/main.lfm @@ -14,6 +14,7 @@ object MainForm: TMainForm OnMouseWheel = FormMouseWheel OnShow = FormShow Position = poMainFormCenter + LCLVersion = '3.8.0.0' object StatusBar: TStatusBar Left = 0 Height = 29 @@ -73,7 +74,7 @@ object MainForm: TMainForm end object tlbSep1: TToolButton Left = 74 - Height = 28 + Height = 8 Top = 2 Caption = 'tlbSep1' ImageIndex = 2 @@ -104,7 +105,7 @@ object MainForm: TMainForm end object tlbSep2: TToolButton Left = 198 - Height = 28 + Height = 8 Top = 2 Caption = 'tlbSep2' ImageIndex = 3 @@ -138,7 +139,7 @@ object MainForm: TMainForm end object tlbSep6: TToolButton Left = 337 - Height = 28 + Height = 8 Top = 2 Caption = 'tlbSep6' ImageIndex = 97 @@ -252,7 +253,7 @@ object MainForm: TMainForm end object ToolButton2: TToolButton Left = 955 - Height = 28 + Height = 5 Top = 2 Caption = 'ToolButton2' Style = tbsDivider @@ -917,7 +918,7 @@ object MainForm: TMainForm item Position = 0 Text = 'Name' - Width = 145 + Width = 149 end item Alignment = taRightJustify @@ -1168,7 +1169,7 @@ object MainForm: TMainForm item Position = 0 Text = 'Variable' - Width = 248 + Width = 252 end item Position = 1 @@ -1225,7 +1226,7 @@ object MainForm: TMainForm item Position = 0 Text = 'Variable' - Width = 248 + Width = 252 end item Alignment = taRightJustify @@ -1828,7 +1829,7 @@ object MainForm: TMainForm item Position = 7 Text = 'Info' - Width = 244 + Width = 248 end> Header.Height = 20 Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible, hoDisableAnimatedResize] @@ -1899,7 +1900,7 @@ object MainForm: TMainForm item Position = 4 Text = 'Percentage' - Width = 340 + Width = 344 end> Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible, hoDisableAnimatedResize] Header.PopupMenu = popupListHeader @@ -2822,7 +2823,7 @@ object MainForm: TMainForm item Position = 0 Text = 'Main column' - Width = 88 + Width = 113 end item Position = 1 diff --git a/source/preferences.lfm b/source/preferences.lfm index 8d4a2e47..c54c816a 100644 --- a/source/preferences.lfm +++ b/source/preferences.lfm @@ -33,79 +33,111 @@ object frmPreferences: TfrmPreferences ClientWidth = 862 ImageIndex = 137 object lblMySQLBinaries: TLabel + AnchorSideTop.Control = chkColorBars + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 221 + Top = 224 Width = 216 + BorderSpacing.Around = 6 Caption = 'MySQL command line programs:' end object lblLanguage: TLabel + AnchorSideTop.Control = editCustomSnippetsDirectory + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 289 + Top = 292 Width = 156 + BorderSpacing.Around = 6 Caption = 'Application language: *' end object lblCustomSnippetsDirectory: TLabel + AnchorSideTop.Control = editMySQLBinaries + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 255 + Top = 258 Width = 175 + BorderSpacing.Around = 6 Caption = 'Custom snippets directory:' end object lblGUIFont: TLabel + AnchorSideTop.Control = comboAppLanguage + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 322 + Top = 326 Width = 68 + BorderSpacing.Around = 6 Caption = 'GUI font: *' end object lblGUIFontSize: TLabel - Left = 801 + AnchorSideTop.Control = comboAppLanguage + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabMisc + AnchorSideRight.Side = asrBottom + Left = 842 Height = 20 - Top = 322 + Top = 326 Width = 14 Anchors = [akTop, akRight] + BorderSpacing.Around = 6 Caption = 'pt' end object lblTheme: TLabel + AnchorSideTop.Control = comboGUIFont + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 356 + Top = 360 Width = 94 + BorderSpacing.Around = 6 Caption = 'Style Theme: *' end object lblIconPack: TLabel + AnchorSideTop.Control = comboTheme + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 390 + Top = 394 Width = 66 + BorderSpacing.Around = 6 Caption = 'Icon pack:' end object lblWebSearchBaseUrl: TLabel + AnchorSideTop.Control = comboIconPack + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 Hint = 'Used in footer of various message dialogs' - Top = 424 + Top = 428 Width = 135 + BorderSpacing.Around = 6 Caption = 'Web search base url:' end object chkAutoReconnect: TCheckBox + AnchorSideTop.Control = chkAllowMultiInstances + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 39 + Top = 40 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Automatically reconnect to previously opened sessions on startup' TabOrder = 1 OnClick = Modified end object chkRestoreLastDB: TCheckBox + AnchorSideTop.Control = chkAutoReconnect + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 68 + Top = 70 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Restore last used database on startup' Checked = True State = cbChecked @@ -113,58 +145,62 @@ object frmPreferences: TfrmPreferences OnClick = Modified end object chkUpdatecheck: TCheckBox + AnchorSideTop.Control = chkRestoreLastDB + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 Hint = '0 = on each application start' - Top = 96 + Top = 100 Width = 216 + BorderSpacing.Around = 6 Caption = 'Check for updates each [day]:' TabOrder = 3 OnClick = chkUpdatecheckClick end object editUpdatecheckInterval: TEdit - Left = 511 + AnchorSideLeft.Control = chkUpdatecheck + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = chkRestoreLastDB + AnchorSideTop.Side = asrBottom + Left = 497 Height = 28 - Top = 94 + Top = 100 Width = 54 + BorderSpacing.Around = 6 Enabled = False + NumbersOnly = True TabOrder = 4 Text = '1' OnChange = Modified end - object updownUpdatecheckInterval: TUpDown - Left = 565 - Height = 28 - Top = 94 - Width = 20 - Associate = editUpdatecheckInterval - Enabled = False - Max = 999 - Min = 0 - OnChanging = anyUpDownLimitChanging - Position = 1 - TabOrder = 5 - end object chkUpdateCheckBuilds: TCheckBox - Left = 610 + AnchorSideLeft.Control = editUpdatecheckInterval + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = chkRestoreLastDB + AnchorSideTop.Side = asrBottom + Left = 557 Height = 24 - Top = 96 - Width = 229 + Top = 100 + Width = 282 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Also check for updated nightly builds' Enabled = False - TabOrder = 6 + TabOrder = 5 OnClick = Modified end object chkDoStatistics: TCheckBox + AnchorSideTop.Control = editUpdatecheckInterval + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 Hint = 'This option, if enabled, will cause HeidiSQL to ping heidisql.com at most once every month. This is used to count the used HeidiSQL and server versions.' - Top = 125 + Top = 134 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Send usage statistics' - TabOrder = 7 + TabOrder = 6 OnClick = Modified end object chkAllowMultiInstances: TCheckBox @@ -173,6 +209,7 @@ object frmPreferences: TfrmPreferences Top = 10 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Allow multiple application instances' Checked = True State = cbChecked @@ -180,20 +217,28 @@ object frmPreferences: TfrmPreferences OnClick = Modified end object chkColorBars: TCheckBox + AnchorSideTop.Control = chkWheelZoom + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 185 + Top = 194 Width = 251 + BorderSpacing.Around = 6 Caption = 'Display bars in various list columns' - TabOrder = 9 + TabOrder = 8 OnClick = Modified end object editMySQLBinaries: TEditButton + AnchorSideTop.Control = chkColorBars + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabMisc + AnchorSideRight.Side = asrBottom Left = 275 Height = 28 - Top = 218 - Width = 564 + Top = 224 + Width = 581 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Images = MainForm.ImageListIcons8 ImageIndex = 51 @@ -203,28 +248,38 @@ object frmPreferences: TfrmPreferences OnChange = Modified OnDblClick = editMySQLBinariesRightButtonClick PasswordChar = #0 - TabOrder = 10 + TabOrder = 9 Text = 'editMySQLBinaries' TextHint = 'Find mysql.exe directory' end object comboAppLanguage: TComboBox Tag = 1 + AnchorSideTop.Control = editCustomSnippetsDirectory + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabMisc + AnchorSideRight.Side = asrBottom Left = 275 Height = 28 - Top = 285 - Width = 564 + Top = 292 + Width = 581 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList - TabOrder = 12 + TabOrder = 11 OnClick = Modified end object editCustomSnippetsDirectory: TEditButton + AnchorSideTop.Control = editMySQLBinaries + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabMisc + AnchorSideRight.Side = asrBottom Left = 275 Height = 28 - Top = 251 - Width = 564 + Top = 258 + Width = 581 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Images = MainForm.ImageListIcons8 ImageIndex = 51 @@ -234,86 +289,101 @@ object frmPreferences: TfrmPreferences OnChange = Modified OnDblClick = editCustomSnippetsDirectoryRightButtonClick PasswordChar = #0 - TabOrder = 11 + TabOrder = 10 Text = 'editCustomSnippetsDirectory' TextHint = 'Set custom directory for SQL snippet files' end object comboGUIFont: TComboBox Tag = 1 + AnchorSideTop.Control = comboAppLanguage + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = editGUIFontSize Left = 275 Height = 28 - Top = 319 - Width = 423 + Top = 326 + Width = 493 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList - TabOrder = 13 + TabOrder = 12 OnChange = comboGUIFontChange end object editGUIFontSize: TEdit Tag = 1 - Left = 707 + AnchorSideLeft.Control = comboGUIFont + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = comboAppLanguage + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = lblGUIFontSize + Left = 774 Height = 28 - Top = 319 + Top = 326 Width = 62 Anchors = [akTop, akRight] - TabOrder = 14 + BorderSpacing.Around = 6 + NumbersOnly = True + TabOrder = 13 Text = '8' OnChange = Modified end - object updownGUIFontSize: TUpDown - Tag = 1 - Left = 776 - Height = 28 - Top = 319 - Width = 20 - Anchors = [akTop, akRight] - Associate = editGUIFontSize - Min = 4 - OnChanging = anyUpDownLimitChanging - Position = 8 - TabOrder = 15 - end object chkWheelZoom: TCheckBox + AnchorSideTop.Control = chkDoStatistics + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 154 + Top = 164 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Use Ctrl+Mousewheel for zooming' - TabOrder = 8 + TabOrder = 7 OnClick = Modified end object comboTheme: TComboBox Tag = 1 + AnchorSideTop.Control = comboGUIFont + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = chkThemePreview Left = 275 Height = 28 - Top = 352 - Width = 423 + Top = 360 + Width = 503 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 Sorted = True Style = csDropDownList - TabOrder = 16 + TabOrder = 14 OnSelect = comboThemeSelect end object comboIconPack: TComboBox + AnchorSideTop.Control = comboTheme + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabMisc + AnchorSideRight.Side = asrBottom Left = 275 Height = 28 - Top = 386 - Width = 564 + Top = 394 + Width = 581 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList - TabOrder = 18 + TabOrder = 16 OnChange = Modified end object comboWebSearchBaseUrl: TComboBox + AnchorSideTop.Control = comboIconPack + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabMisc + AnchorSideRight.Side = asrBottom Left = 275 Height = 28 - Top = 420 - Width = 564 + Top = 428 + Width = 581 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 Items.Strings = ( 'https://www.ecosia.org/search?q=%query' @@ -325,18 +395,23 @@ object frmPreferences: TfrmPreferences 'https://www.bing.com/search?q=%query' 'https://www.google.com/search?q=%query' ) - TabOrder = 19 + TabOrder = 17 Text = 'comboWebSearchBaseUrl' OnChange = Modified end object chkThemePreview: TCheckBox - Left = 754 + AnchorSideTop.Control = comboGUIFont + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabMisc + AnchorSideRight.Side = asrBottom + Left = 784 Height = 24 - Top = 355 + Top = 360 Width = 72 Anchors = [akTop, akRight] + BorderSpacing.Around = 6 Caption = 'Preview' - TabOrder = 17 + TabOrder = 15 OnClick = chkThemePreviewClick end end @@ -350,41 +425,62 @@ object frmPreferences: TfrmPreferences Height = 20 Top = 14 Width = 52 + BorderSpacing.Around = 6 Caption = 'Log last' end object lblLogLinesHint: TLabel - Left = 371 + AnchorSideLeft.Control = editLogLines + AnchorSideLeft.Side = asrBottom + Left = 347 Height = 20 Top = 14 Width = 102 + BorderSpacing.Around = 6 Caption = 'lines in SQL log' end object lblLogSnipHint: TLabel - Left = 371 + AnchorSideLeft.Control = editLogSnip + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = editLogLines + AnchorSideTop.Side = asrBottom + Left = 347 Height = 20 - Top = 48 + Top = 44 Width = 189 + BorderSpacing.Around = 6 Caption = 'characters (0 = no snipping)' end object lblLogSnip: TLabel + AnchorSideTop.Control = editLogLines + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 48 + Top = 44 Width = 137 + BorderSpacing.Around = 6 Caption = 'Snip SQL log lines to' end object lblLogLevel: TLabel + AnchorSideTop.Control = editLogDir + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 119 + Top = 112 Width = 74 + BorderSpacing.Around = 6 Caption = 'Log events:' end object lblQueryHistoryKeepDays: TLabel - Left = 548 + AnchorSideLeft.Control = editQueryHistoryKeepDays + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = chkLogEventDebug + AnchorSideTop.Side = asrBottom + Left = 508 Height = 20 - Top = 309 + Top = 298 Width = 289 + BorderSpacing.Top = 6 + BorderSpacing.Around = 6 Caption = 'days to keep queries before removing them' end object editLogLines: TEdit @@ -392,104 +488,110 @@ object frmPreferences: TfrmPreferences Height = 28 Top = 10 Width = 66 + BorderSpacing.Around = 6 + NumbersOnly = True TabOrder = 0 Text = '1' OnChange = Modified end - object updownLogLines: TUpDown - Left = 341 - Height = 28 - Top = 10 - Width = 20 - Associate = editLogLines - Max = 32767 - Min = 1 - OnChanging = anyUpDownLimitChanging - Position = 1 - TabOrder = 1 - Wrap = True - end - object updownLogSnip: TUpDown - Left = 341 - Height = 28 - Top = 44 - Width = 20 - Associate = editLogSnip - Max = 32767 - Min = 0 - OnChanging = anyUpDownLimitChanging - Position = 2000 - TabOrder = 3 - end object editLogSnip: TEdit + AnchorSideTop.Control = editLogLines + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 Top = 44 Width = 66 - TabOrder = 2 + BorderSpacing.Around = 6 + NumbersOnly = True + TabOrder = 1 Text = '2000' OnChange = Modified end object chkLogToFile: TCheckBox + AnchorSideTop.Control = editLogSnip + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 80 + Top = 78 Width = 156 + BorderSpacing.Around = 6 Caption = 'Write SQL log to file' - TabOrder = 4 + TabOrder = 2 OnClick = chkLogToFileClick end object chkLogEventErrors: TCheckBox + AnchorSideTop.Control = editLogDir + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 118 + Top = 112 Width = 59 + BorderSpacing.Around = 6 Caption = 'Errors' - TabOrder = 6 + TabOrder = 4 OnClick = Modified end object chkLogEventUserGeneratedSQL: TCheckBox + AnchorSideTop.Control = chkLogEventErrors + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 146 + Top = 142 Width = 206 + BorderSpacing.Around = 6 Caption = 'User-generated SQL queries' - TabOrder = 7 + TabOrder = 5 OnClick = Modified end object chkLogEventSQL: TCheckBox + AnchorSideTop.Control = chkLogEventUserGeneratedSQL + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 175 + Top = 172 Width = 153 + BorderSpacing.Around = 6 Caption = 'Internal SQL queries' - TabOrder = 8 + TabOrder = 6 OnClick = Modified end object chkLogEventInfo: TCheckBox + AnchorSideTop.Control = chkLogEventScript + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 Top = 232 Width = 167 + BorderSpacing.Around = 6 Caption = 'Information messages' - TabOrder = 10 + TabOrder = 8 OnClick = Modified end object chkLogEventDebug: TCheckBox + AnchorSideTop.Control = chkLogEventInfo + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 261 + Top = 262 Width = 134 + BorderSpacing.Around = 6 Caption = 'Debug messages' - TabOrder = 11 + TabOrder = 9 OnClick = Modified end object editLogDir: TEditButton - Left = 451 + AnchorSideLeft.Control = chkLogToFile + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = editLogSnip + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabLogging + AnchorSideRight.Side = asrBottom + Left = 437 Height = 28 Top = 78 - Width = 388 + Width = 419 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Enabled = False Images = MainForm.ImageListIcons8 @@ -500,67 +602,74 @@ object frmPreferences: TfrmPreferences OnChange = Modified OnDblClick = editLogDirRightButtonClick PasswordChar = #0 - TabOrder = 5 + TabOrder = 3 Text = 'editLogDir' TextHint = 'Select output directory' end object chkQueryHistory: TCheckBox + AnchorSideTop.Control = chkLogEventDebug + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 308 + Top = 298 Width = 155 + BorderSpacing.Top = 6 + BorderSpacing.Around = 6 Caption = 'Enable query history' - TabOrder = 12 + TabOrder = 10 OnClick = chkQueryHistoryClick end object chkHorizontalScrollbar: TCheckBox + AnchorSideTop.Control = editQueryHistoryKeepDays + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 336 + Top = 332 Width = 152 + BorderSpacing.Around = 6 Caption = 'Horizontal scrollbar' - TabOrder = 15 + TabOrder = 12 OnClick = Modified end object editQueryHistoryKeepDays: TEdit - Left = 451 + AnchorSideLeft.Control = chkQueryHistory + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = chkLogEventDebug + AnchorSideTop.Side = asrBottom + Left = 436 Height = 28 - Top = 305 + Top = 298 Width = 66 + BorderSpacing.Top = 6 + BorderSpacing.Around = 6 Enabled = False - TabOrder = 13 + NumbersOnly = True + TabOrder = 11 Text = '1' OnChange = Modified end - object updownQueryHistoryKeepDays: TUpDown - Left = 517 - Height = 28 - Top = 305 - Width = 20 - Associate = editQueryHistoryKeepDays - Enabled = False - Max = 365 - Min = 1 - OnChanging = anyUpDownLimitChanging - Position = 1 - TabOrder = 14 - end object chkLogEventScript: TCheckBox + AnchorSideTop.Control = chkLogEventSQL + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 204 + Top = 202 Width = 160 + BorderSpacing.Around = 6 Caption = 'Import/script queries' - TabOrder = 9 + TabOrder = 7 OnClick = Modified end object chkLogTimestamp: TCheckBox + AnchorSideTop.Control = chkHorizontalScrollbar + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 365 + Top = 362 Width = 256 + BorderSpacing.Around = 6 Caption = 'Add timestamp to all log messages' - TabOrder = 16 + TabOrder = 13 OnClick = Modified end end @@ -574,69 +683,100 @@ object frmPreferences: TfrmPreferences Height = 20 Top = 14 Width = 74 + BorderSpacing.Around = 6 Caption = 'Editor font:' end object lblSQLFontSizeUnit: TLabel - Left = 558 + AnchorSideLeft.Control = editSQLFontSize + AnchorSideLeft.Side = asrBottom + Left = 522 Height = 20 Top = 14 Width = 14 + BorderSpacing.Around = 6 Caption = 'pt' end object Label1: TLabel + AnchorSideTop.Control = comboSQLFontName + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 46 + Top = 44 Width = 67 + BorderSpacing.Around = 6 Caption = 'Tab width:' end object lblMaxQueryResults: TLabel + AnchorSideTop.Control = editSQLTabWidth + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 80 + Top = 78 Width = 138 + BorderSpacing.Around = 6 Caption = 'Maximum result sets:' end object lblSQLColElement: TLabel + AnchorSideTop.Control = comboEditorColorsPreset + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 232 + Top = 210 Width = 57 + BorderSpacing.Around = 6 Caption = 'Element:' end object lblSQLColBackground: TLabel + AnchorSideTop.Control = cboxSQLColForeground + AnchorSideTop.Side = asrBottom Left = 275 Height = 20 - Top = 350 + Top = 332 Width = 82 + BorderSpacing.Around = 6 Caption = 'Background:' end object lblSQLColForeground: TLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = chkSQLItalic + AnchorSideTop.Side = asrBottom Left = 275 Height = 20 - Top = 291 + Top = 274 Width = 80 + BorderSpacing.Around = 6 Caption = 'Foreground:' end object lblEditorColorsPreset: TLabel + AnchorSideTop.Control = chkAutoUppercase + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 199 + Top = 176 Width = 90 + BorderSpacing.Around = 6 Caption = 'Colors preset:' end object lblCompletionProposal: TLabel + AnchorSideTop.Control = editMaxQueryResults + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 109 + Top = 112 Width = 178 + BorderSpacing.Around = 6 Caption = 'Auto completion proposal:' end object lblCompletionProposalIntervalUnit: TLabel - Left = 558 + AnchorSideLeft.Control = editCompletionProposalInterval + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = editMaxQueryResults + AnchorSideTop.Side = asrBottom + Left = 407 Height = 20 - Top = 109 + Top = 112 Width = 19 + BorderSpacing.Around = 6 Caption = 'ms' Enabled = False end @@ -645,145 +785,160 @@ object frmPreferences: TfrmPreferences Height = 28 Top = 10 Width = 181 + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList TabOrder = 0 OnChange = SQLFontChange end object editSQLFontSize: TEdit - Left = 464 + AnchorSideLeft.Control = comboSQLFontName + AnchorSideLeft.Side = asrBottom + Left = 462 Height = 28 Top = 10 Width = 54 + BorderSpacing.Around = 6 + NumbersOnly = True TabOrder = 1 Text = '9' OnExit = SQLFontChange end - object updownSQLFontSize: TUpDown - Left = 518 - Height = 28 - Top = 10 - Width = 20 - Associate = editSQLFontSize - Min = 0 - OnClick = updownSQLFontSizeClick - Position = 9 - TabOrder = 2 - end object chkCompletionProposal: TCheckBox + AnchorSideTop.Control = editMaxQueryResults + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 109 + Top = 112 Width = 66 + BorderSpacing.Around = 6 Caption = 'Enable' - TabOrder = 8 + TabOrder = 5 OnClick = chkCompletionProposalClick end object chkTabsToSpaces: TCheckBox - Left = 368 + AnchorSideLeft.Control = editSQLTabWidth + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = comboSQLFontName + AnchorSideTop.Side = asrBottom + Left = 332 Height = 24 - Top = 45 + Top = 44 Width = 118 + BorderSpacing.Around = 6 Caption = 'Tabs to spaces' - TabOrder = 5 + TabOrder = 3 OnClick = Modified end object editSQLTabWidth: TEdit + AnchorSideTop.Control = comboSQLFontName + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 - Top = 42 + Top = 44 Width = 51 - TabOrder = 3 + BorderSpacing.Around = 6 + NumbersOnly = True + TabOrder = 2 Text = '0' OnExit = SQLFontChange end - object updownSQLTabWidth: TUpDown - Left = 326 - Height = 28 - Top = 42 - Width = 20 - Associate = editSQLTabWidth - Min = 0 - OnClick = updownSQLFontSizeClick - Position = 0 - TabOrder = 4 - end object editMaxQueryResults: TEdit + AnchorSideTop.Control = editSQLTabWidth + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 - Top = 76 + Top = 78 Width = 51 - TabOrder = 6 + BorderSpacing.Around = 6 + NumbersOnly = True + TabOrder = 4 Text = '1' OnChange = Modified end - object updownMaxQueryResults: TUpDown - Left = 326 - Height = 28 - Top = 76 - Width = 20 - Associate = editMaxQueryResults - Min = 1 - OnChanging = anyUpDownLimitChanging - Position = 1 - TabOrder = 7 - end object comboSQLColElement: TComboBox + AnchorSideTop.Control = comboEditorColorsPreset + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 - Top = 229 + Top = 210 Width = 181 + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList - TabOrder = 14 + TabOrder = 10 OnChange = comboSQLColElementChange end object chkSQLBold: TCheckBox + AnchorSideTop.Control = comboSQLColElement + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 262 + Top = 244 Width = 52 + BorderSpacing.Around = 6 Caption = 'Bold' - TabOrder = 15 + TabOrder = 11 OnClick = SQLFontChange end object chkSQLItalic: TCheckBox - Left = 368 + AnchorSideLeft.Control = chkSQLBold + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = comboSQLColElement + AnchorSideTop.Side = asrBottom + Left = 333 Height = 24 - Top = 262 + Top = 244 Width = 53 + BorderSpacing.Around = 6 Caption = 'Italic' - TabOrder = 16 + TabOrder = 12 OnClick = SQLFontChange end object cboxSQLColForeground: TColorBox + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = lblSQLColForeground + AnchorSideTop.Side = asrBottom Left = 275 - Height = 28 - Top = 315 + Height = 26 + Top = 300 Width = 181 NoneColorColor = clNone Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeNone, cbCustomColor, cbPrettyNames, cbCustomColors] + BorderSpacing.Around = 6 ItemHeight = 20 OnChange = SQLFontChange - TabOrder = 17 + TabOrder = 13 end object cboxSQLColBackground: TColorBox + AnchorSideTop.Control = lblSQLColBackground + AnchorSideTop.Side = asrBottom Left = 275 - Height = 28 - Top = 374 + Height = 26 + Top = 358 Width = 181 NoneColorColor = clNone Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeNone, cbCustomColor, cbPrettyNames, cbCustomColors] + BorderSpacing.Around = 6 ItemHeight = 20 OnChange = SQLFontChange - TabOrder = 18 + TabOrder = 14 end inline SynMemoSQLSample: TSynEdit + AnchorSideLeft.Control = comboEditorColorsPreset + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = chkAutoUppercase + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabSQL + AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = tabSQL + AnchorSideBottom.Side = asrBottom Cursor = crHandPoint - Left = 464 - Height = 279 - Top = 195 - Width = 375 + Left = 462 + Height = 328 + Top = 176 + Width = 394 + BorderSpacing.Around = 6 Anchors = [akTop, akLeft, akRight, akBottom] Font.Color = clWindowText Font.Height = -16 @@ -792,7 +947,7 @@ object frmPreferences: TfrmPreferences Font.Quality = fqNonAntialiased ParentColor = False ParentFont = False - TabOrder = 19 + TabOrder = 15 OnClick = SynMemoSQLSampleClick Gutter.Visible = False Gutter.Width = 72 @@ -870,63 +1025,68 @@ object frmPreferences: TfrmPreferences end end object chkAutoUppercase: TCheckBox + AnchorSideTop.Control = editCompletionProposalInterval + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 166 + Top = 146 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Auto uppercase reserved words and functions' - TabOrder = 12 + TabOrder = 8 OnClick = Modified end object comboEditorColorsPreset: TComboBox + AnchorSideTop.Control = chkAutoUppercase + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 - Top = 195 + Top = 176 Width = 181 + BorderSpacing.Around = 6 ItemHeight = 20 ItemIndex = 0 Items.Strings = ( 'Current custom settings' ) Style = csDropDownList - TabOrder = 13 + TabOrder = 9 Text = 'Current custom settings' OnChange = comboEditorColorsPresetChange end object chkCompletionProposalSearchOnMid: TCheckBox - Left = 620 + AnchorSideLeft.Control = lblCompletionProposalIntervalUnit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = editMaxQueryResults + AnchorSideTop.Side = asrBottom + Left = 432 Height = 24 - Top = 109 - Width = 219 + Top = 112 + Width = 407 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Find matches in the middle' Enabled = False - TabOrder = 11 + TabOrder = 7 OnClick = Modified end object editCompletionProposalInterval: TEdit - Left = 464 + AnchorSideLeft.Control = chkCompletionProposal + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = editMaxQueryResults + AnchorSideTop.Side = asrBottom + Left = 347 Height = 28 - Top = 105 + Top = 112 Width = 54 + BorderSpacing.Around = 6 Enabled = False - TabOrder = 9 + NumbersOnly = True + TabOrder = 6 Text = '0' OnChange = Modified end - object updownCompletionProposalInterval: TUpDown - Left = 518 - Height = 28 - Top = 105 - Width = 25 - Associate = editCompletionProposalInterval - Enabled = False - Min = 0 - OnChanging = anyUpDownLimitChanging - Position = 0 - TabOrder = 10 - end end object tabGridFormatting: TTabSheet Caption = 'Grid formatting' @@ -938,85 +1098,123 @@ object frmPreferences: TfrmPreferences Height = 20 Top = 14 Width = 163 + BorderSpacing.Around = 6 Caption = 'Maximum column width:' end object lblDataFontHint: TLabel - Left = 555 + AnchorSideLeft.Control = editDataFontSize + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = editGridRowsLineCount + AnchorSideTop.Side = asrBottom + Left = 520 Height = 20 - Top = 116 + Top = 112 Width = 14 + BorderSpacing.Around = 6 Caption = 'pt' end object lblDataFont: TLabel + AnchorSideTop.Control = editGridRowsLineCount + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 115 + Top = 112 Width = 32 + BorderSpacing.Around = 6 Caption = 'Font:' FocusControl = comboDataFontName end object lblMaxTotalRows: TLabel + AnchorSideTop.Control = editMaxColWidth + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 48 + Top = 44 Width = 201 + BorderSpacing.Around = 6 Caption = 'Rows per page and maximum:' end object lblGridRowsLinecount: TLabel + AnchorSideTop.Control = editGridRowCountStep + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 81 + Top = 78 Width = 165 + BorderSpacing.Around = 6 Caption = 'Lines of text in grid rows:' end object lblGridTextColors: TLabel + AnchorSideTop.Control = comboDataFontName + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 149 + Top = 146 Width = 104 + BorderSpacing.Around = 6 Caption = 'Grid text colors:' end object lblNullBackground: TLabel + AnchorSideTop.Control = comboGridTextColors + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 Hint = 'Use "None" to disable' - Top = 216 + Top = 214 Width = 121 + BorderSpacing.Around = 6 Caption = 'NULL background:' end object Label2: TLabel + AnchorSideTop.Control = cboxNullBackground + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 251 + Top = 246 Width = 189 + BorderSpacing.Around = 6 Caption = 'Alternating row background:' end object Label3: TLabel + AnchorSideTop.Control = cboxRowBackgroundEven + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 286 + Top = 278 Width = 152 + BorderSpacing.Around = 6 Caption = 'Same text background:' end object lblLongSortRowNum: TLabel + AnchorSideTop.Control = editRealTrailingZeros + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 356 + Top = 344 Width = 174 + BorderSpacing.Around = 6 Caption = 'Sort warning on grid rows:' end object lblRealTrailingZeros: TLabel + AnchorSideTop.Control = cboxRowHighlightSameText + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 321 + Top = 310 Width = 191 + BorderSpacing.Around = 6 Caption = 'Max decimal zeros for floats:' end object lblRealTrailingZerosHint: TLabel - Left = 370 + AnchorSideLeft.Control = editRealTrailingZeros + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cboxRowHighlightSameText + AnchorSideTop.Side = asrBottom + Left = 333 Height = 20 - Top = 321 + Top = 310 Width = 170 + BorderSpacing.Around = 6 Caption = 'Set to -1 to keep all zeros' end object editMaxColWidth: TEdit @@ -1024,237 +1222,250 @@ object frmPreferences: TfrmPreferences Height = 28 Top = 10 Width = 52 + BorderSpacing.Around = 6 + NumbersOnly = True TabOrder = 0 Text = '1' OnChange = Modified end - object updownMaxColWidth: TUpDown - Left = 327 - Height = 28 - Top = 10 - Width = 20 - Associate = editMaxColWidth - Max = 1000 - Min = 1 - OnChanging = anyUpDownLimitChanging - Position = 1 - TabOrder = 1 - end object comboDataFontName: TComboBox + AnchorSideTop.Control = editGridRowsLineCount + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 - Top = 111 + Top = 112 Width = 181 + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList - TabOrder = 6 + TabOrder = 4 OnChange = DataFontsChange end object editDataFontSize: TEdit - Left = 464 + AnchorSideLeft.Control = comboDataFontName + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = editGridRowsLineCount + AnchorSideTop.Side = asrBottom + Left = 462 Height = 28 - Top = 111 + Top = 112 Width = 52 - TabOrder = 7 + BorderSpacing.Around = 6 + NumbersOnly = True + TabOrder = 5 Text = '8' OnChange = DataFontsChange end - object updownDataFontSize: TUpDown - Left = 516 - Height = 28 - Top = 111 - Width = 20 - Associate = editDataFontSize - Min = 0 - Position = 8 - TabOrder = 8 - end object editGridRowCountMax: TEdit - Left = 464 + AnchorSideLeft.Control = editGridRowCountStep + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = editMaxColWidth + AnchorSideTop.Side = asrBottom + Left = 462 Height = 28 Top = 44 Width = 165 - NumbersOnly = True - TabOrder = 3 - OnChange = Modified - OnExit = editGridRowCountExit - end - object editGridRowCountStep: TEdit - Left = 275 - Height = 28 - Top = 44 - Width = 181 + BorderSpacing.Around = 6 NumbersOnly = True TabOrder = 2 OnChange = Modified OnExit = editGridRowCountExit end + object editGridRowCountStep: TEdit + AnchorSideTop.Control = editMaxColWidth + AnchorSideTop.Side = asrBottom + Left = 275 + Height = 28 + Top = 44 + Width = 181 + BorderSpacing.Around = 6 + NumbersOnly = True + TabOrder = 1 + OnChange = Modified + OnExit = editGridRowCountExit + end object editGridRowsLineCount: TEdit + AnchorSideTop.Control = editGridRowCountStep + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 Top = 78 Width = 52 - TabOrder = 4 + BorderSpacing.Around = 6 + NumbersOnly = True + TabOrder = 3 Text = '1' OnChange = Modified end - object updownGridRowsLineCount: TUpDown - Left = 327 - Height = 28 - Top = 78 - Width = 20 - Associate = editGridRowsLineCount - Min = 1 - OnChanging = anyUpDownLimitChanging - Position = 1 - TabOrder = 5 - end object comboGridTextColors: TComboBox + AnchorSideTop.Control = comboGridTextColorsPreset + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 - Top = 179 + Top = 180 Width = 181 + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList - TabOrder = 10 + TabOrder = 7 OnSelect = comboGridTextColorsSelect end object colorBoxGridTextColors: TColorBox - Left = 464 - Height = 28 - Top = 179 + AnchorSideLeft.Control = comboGridTextColors + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = comboGridTextColorsPreset + AnchorSideTop.Side = asrBottom + Left = 462 + Height = 26 + Top = 180 Width = 165 Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor, cbPrettyNames] + BorderSpacing.Around = 6 ItemHeight = 20 OnSelect = colorBoxGridTextColorsSelect - TabOrder = 11 + TabOrder = 8 end object cboxNullBackground: TColorBox + AnchorSideTop.Control = comboGridTextColors + AnchorSideTop.Side = asrBottom Left = 275 - Height = 28 - Top = 212 + Height = 26 + Top = 214 Width = 181 Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeNone, cbCustomColor, cbPrettyNames] + BorderSpacing.Around = 6 ItemHeight = 20 OnChange = Modified OnSelect = Modified - TabOrder = 12 + TabOrder = 9 end object cboxRowBackgroundOdd: TColorBox - Left = 464 - Height = 28 - Top = 248 + AnchorSideLeft.Control = cboxRowBackgroundEven + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cboxNullBackground + AnchorSideTop.Side = asrBottom + Left = 462 + Height = 26 + Top = 246 Width = 165 Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeNone, cbCustomColor, cbPrettyNames] + BorderSpacing.Around = 6 ItemHeight = 20 OnChange = Modified - TabOrder = 14 + TabOrder = 11 end object cboxRowBackgroundEven: TColorBox + AnchorSideTop.Control = cboxNullBackground + AnchorSideTop.Side = asrBottom Left = 275 - Height = 28 - Top = 248 + Height = 26 + Top = 246 Width = 181 Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeNone, cbCustomColor, cbPrettyNames] + BorderSpacing.Around = 6 ItemHeight = 20 OnChange = Modified - TabOrder = 13 + TabOrder = 10 end object chkLocalNumberFormat: TCheckBox + AnchorSideTop.Control = editLongSortRowNum + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 388 + Top = 378 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Local number format' - TabOrder = 20 + TabOrder = 15 OnClick = Modified end object chkHintsOnResultTabs: TCheckBox + AnchorSideTop.Control = chkLowercaseHex + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 445 + Top = 438 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Pop up SQL text over result tabs' - TabOrder = 22 + TabOrder = 17 OnClick = Modified end object cboxRowHighlightSameText: TColorBox + AnchorSideTop.Control = cboxRowBackgroundEven + AnchorSideTop.Side = asrBottom Left = 275 - Height = 28 - Top = 282 + Height = 26 + Top = 278 Width = 181 Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeNone, cbCustomColor, cbPrettyNames] + BorderSpacing.Around = 6 ItemHeight = 20 OnSelect = Modified - TabOrder = 15 + TabOrder = 12 end object comboGridTextColorsPreset: TComboBox + AnchorSideTop.Control = comboDataFontName + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 - Top = 145 + Top = 146 Width = 181 + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList - TabOrder = 9 + TabOrder = 6 OnSelect = comboGridTextColorsPresetSelect end object editLongSortRowNum: TEdit + AnchorSideTop.Control = editRealTrailingZeros + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 - Top = 352 + Top = 344 Width = 181 - TabOrder = 18 + BorderSpacing.Around = 6 + NumbersOnly = True + TabOrder = 14 Text = '0' end - object updownLongSortRowNum: TUpDown - Left = 456 - Height = 28 - Top = 352 - Width = 20 - Associate = editLongSortRowNum - Max = -1 - Min = 0 - OnChanging = anyUpDownLimitChanging - Position = 0 - TabOrder = 19 - end object chkLowercaseHex: TCheckBox + AnchorSideTop.Control = chkLocalNumberFormat + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 416 + Top = 408 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Lowercase hexadecimal' - TabOrder = 21 + TabOrder = 16 end object editRealTrailingZeros: TEdit + AnchorSideTop.Control = cboxRowHighlightSameText + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 - Top = 318 + Top = 310 Width = 52 - TabOrder = 16 + BorderSpacing.Around = 6 + NumbersOnly = True + TabOrder = 13 Text = '0' end - object updownRealTrailingZeros: TUpDown - Left = 327 - Height = 28 - Top = 318 - Width = 20 - Associate = editRealTrailingZeros - Min = -1 - Position = 0 - TabOrder = 17 - end object chkShowRowId: TCheckBox + AnchorSideTop.Control = chkHintsOnResultTabs + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 474 + Top = 468 Width = 566 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Show static row id column' - TabOrder = 23 + TabOrder = 18 OnClick = Modified end end @@ -1264,10 +1475,13 @@ object frmPreferences: TfrmPreferences ClientWidth = 862 ImageIndex = 33 object lblLineBreakStyle: TLabel + AnchorSideTop.Control = chkIncrementalSearch + AnchorSideTop.Side = asrBottom Left = 4 Height = 20 - Top = 294 + Top = 286 Width = 151 + BorderSpacing.Around = 6 Caption = 'Default linebreak style:' end object chkEditorBinary: TCheckBox @@ -1276,94 +1490,123 @@ object frmPreferences: TfrmPreferences Top = 10 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Enable popup BLOB/HEX editor' TabOrder = 0 OnClick = Modified end object chkEditorDatetime: TCheckBox + AnchorSideTop.Control = chkEditorBinary + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 39 + Top = 40 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Enable inplace date/time editor' TabOrder = 1 OnClick = Modified end object chkPrefillDateTime: TCheckBox + AnchorSideTop.Control = chkEditorDatetime + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 68 + Top = 70 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Prefill empty date/time fields with current date/time' TabOrder = 2 OnClick = Modified end object chkEditorEnum: TCheckBox + AnchorSideTop.Control = chkPrefillDateTime + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 96 + Top = 100 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Enable ENUM pulldown editor' TabOrder = 3 OnClick = Modified end object chkEditorSet: TCheckBox + AnchorSideTop.Control = chkEditorEnum + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 125 + Top = 130 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Enable SET checkbox editor' TabOrder = 4 OnClick = Modified end object chkReuseEditorConfiguration: TCheckBox + AnchorSideTop.Control = chkColumnHeaderClick + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 204 + Top = 196 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Remember filters, sorting and column selection across sessions' TabOrder = 6 OnClick = Modified end object chkForeignDropDown: TCheckBox + AnchorSideTop.Control = chkReuseEditorConfiguration + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 232 + Top = 226 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Show values in foreign key columns' TabOrder = 7 OnClick = Modified end object comboLineBreakStyle: TComboBox + AnchorSideTop.Control = chkIncrementalSearch + AnchorSideTop.Side = asrBottom Left = 275 Height = 28 - Top = 290 + Top = 286 Width = 181 + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList TabOrder = 9 OnClick = Modified end object chkColumnHeaderClick: TCheckBox + AnchorSideTop.Control = chkEditorSet + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 175 + Top = 166 Width = 286 + BorderSpacing.Top = 6 + BorderSpacing.Around = 6 Caption = 'Click on column headers toggles sorting' TabOrder = 5 OnClick = Modified end object chkIncrementalSearch: TCheckBox + AnchorSideTop.Control = chkForeignDropDown + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 261 + Top = 256 Width = 247 + BorderSpacing.Around = 6 Caption = 'Incremental search through typing' TabOrder = 8 OnClick = Modified @@ -1463,17 +1706,23 @@ object frmPreferences: TfrmPreferences ClientWidth = 862 ImageIndex = 10 object Label5: TLabel + AnchorSideTop.Control = chkTabCloseOnMiddleClick + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 129 + Top = 130 Width = 182 + BorderSpacing.Around = 6 Caption = 'Grayscale inactive tab icons' end object lblReformatter: TLabel + AnchorSideTop.Control = comboTabIconsGrayscaleMode + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 Top = 164 Width = 83 + BorderSpacing.Around = 6 Caption = 'Reformatter:' end object chkAskFileSave: TCheckBox @@ -1482,6 +1731,7 @@ object frmPreferences: TfrmPreferences Top = 10 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Prompt to save modified files on tab close' Checked = True State = cbChecked @@ -1489,40 +1739,54 @@ object frmPreferences: TfrmPreferences OnClick = Modified end object chkRestoreTabs: TCheckBox + AnchorSideTop.Control = chkAskFileSave + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 39 + Top = 40 Width = 564 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Reopen previously used SQL files and unsaved content in tabs *' TabOrder = 1 OnClick = Modified end object chkTabCloseOnDoubleClick: TCheckBox + AnchorSideTop.Control = chkRestoreTabs + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 68 + Top = 70 Width = 184 + BorderSpacing.Around = 6 Caption = 'Close tab on doubleclick' TabOrder = 2 OnClick = Modified end object chkTabCloseOnMiddleClick: TCheckBox + AnchorSideTop.Control = chkTabCloseOnDoubleClick + AnchorSideTop.Side = asrBottom Left = 275 Height = 24 - Top = 96 + Top = 100 Width = 566 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Close tab on middleclick' TabOrder = 3 OnClick = Modified end object comboTabIconsGrayscaleMode: TComboBox + AnchorSideTop.Control = chkTabCloseOnMiddleClick + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabFiles + AnchorSideRight.Side = asrBottom Left = 275 Height = 28 - Top = 125 - Width = 564 + Top = 130 + Width = 581 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 Items.Strings = ( 'Color icons on all tabs' @@ -1534,11 +1798,16 @@ object frmPreferences: TfrmPreferences OnClick = Modified end object comboReformatter: TComboBox + AnchorSideTop.Control = comboTabIconsGrayscaleMode + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = tabFiles + AnchorSideRight.Side = asrBottom Left = 275 Height = 28 - Top = 160 - Width = 564 + Top = 164 + Width = 581 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList TabOrder = 5 diff --git a/source/preferences.pas b/source/preferences.pas index 8283aeba..0fa45e2e 100644 --- a/source/preferences.pas +++ b/source/preferences.pas @@ -44,15 +44,12 @@ type lblDataFont: TLabel; comboDataFontName: TComboBox; editDataFontSize: TEdit; - updownDataFontSize: TUpDown; lblDataFontHint: TLabel; lblMaxColWidth: TLabel; editMaxColWidth: TEdit; - updownMaxColWidth: TUpDown; chkRestoreLastDB: TCheckBox; chkUpdatecheck: TCheckBox; editUpdatecheckInterval: TEdit; - updownUpdatecheckInterval: TUpDown; chkUpdateCheckBuilds: TCheckBox; SynSQLSynSQLSample: TSynSQLSyn; btnRestoreDefaults: TButton; @@ -68,10 +65,8 @@ type tabLogging: TTabSheet; Label4: TLabel; editLogLines: TEdit; - updownLogLines: TUpDown; lblLogLinesHint: TLabel; lblLogSnipHint: TLabel; - updownLogSnip: TUpDown; editLogSnip: TEdit; lblLogSnip: TLabel; chkLogToFile: TCheckBox; @@ -85,21 +80,17 @@ type editGridRowCountStep: TEdit; lblGridRowsLinecount: TLabel; editGridRowsLineCount: TEdit; - updownGridRowsLineCount: TUpDown; chkColorBars: TCheckBox; comboSQLFontName: TComboBox; lblFont: TLabel; editSQLFontSize: TEdit; - updownSQLFontSize: TUpDown; lblSQLFontSizeUnit: TLabel; chkCompletionProposal: TCheckBox; chkTabsToSpaces: TCheckBox; editSQLTabWidth: TEdit; - updownSQLTabWidth: TUpDown; Label1: TLabel; lblMaxQueryResults: TLabel; editMaxQueryResults: TEdit; - updownMaxQueryResults: TUpDown; lblGridTextColors: TLabel; comboGridTextColors: TComboBox; colorBoxGridTextColors: TColorBox; @@ -139,11 +130,9 @@ type lblGUIFont: TLabel; comboGUIFont: TComboBox; editGUIFontSize: TEdit; - updownGUIFontSize: TUpDown; lblGUIFontSize: TLabel; chkHorizontalScrollbar: TCheckBox; editQueryHistoryKeepDays: TEdit; - updownQueryHistoryKeepDays: TUpDown; lblQueryHistoryKeepDays: TLabel; Label3: TLabel; cboxRowHighlightSameText: TColorBox; @@ -170,17 +159,14 @@ type chkCompletionProposalSearchOnMid: TCheckBox; lblLongSortRowNum: TLabel; editLongSortRowNum: TEdit; - updownLongSortRowNum: TUpDown; chkLowercaseHex: TCheckBox; chkTabCloseOnDoubleClick: TCheckBox; lblRealTrailingZeros: TLabel; editRealTrailingZeros: TEdit; - updownRealTrailingZeros: TUpDown; lblRealTrailingZerosHint: TLabel; chkLogTimestamp: TCheckBox; lblCompletionProposal: TLabel; editCompletionProposalInterval: TEdit; - updownCompletionProposalInterval: TUpDown; lblCompletionProposalIntervalUnit: TLabel; chkColumnHeaderClick: TCheckBox; chkIncrementalSearch: TCheckBox; @@ -313,10 +299,10 @@ begin AppSettings.WriteBool(asAllowMultipleInstances, chkAllowMultiInstances.Checked); AppSettings.WriteBool(asRestoreLastUsedDB, chkRestoreLastDB.Checked); AppSettings.WriteString(asFontName, comboSQLFontName.Text); - AppSettings.WriteInt(asFontSize, updownSQLFontSize.Position); - AppSettings.WriteInt(asTabWidth, updownSQLTabWidth.Position); - AppSettings.WriteInt(asLogsqlnum, updownLogLines.Position); - AppSettings.WriteInt(asLogsqlwidth, updownLogSnip.Position); + AppSettings.WriteInt(asFontSize, MakeInt(editSQLFontSize.Text)); + AppSettings.WriteInt(asTabWidth, MakeInt(editSQLTabWidth.Text)); + AppSettings.WriteInt(asLogsqlnum, MakeInt(editLogLines.Text)); + AppSettings.WriteInt(asLogsqlwidth, MakeInt(editLogSnip.Text)); AppSettings.WriteString(asSessionLogsDirectory, editLogDir.Text); AppSettings.WriteBool(asLogErrors, chkLogEventErrors.Checked); AppSettings.WriteBool(asLogUserSQL, chkLogEventUserGeneratedSQL.Checked); @@ -325,7 +311,7 @@ begin AppSettings.WriteBool(asLogInfos, chkLogEventInfo.Checked); AppSettings.WriteBool(asLogDebug, chkLogEventDebug.Checked); AppSettings.WriteBool(asQueryHistoryEnabled, chkQueryHistory.Checked); - AppSettings.WriteInt(asQueryHistoryKeepDays, updownQueryHistoryKeepDays.Position); + AppSettings.WriteInt(asQueryHistoryKeepDays, MakeInt(editQueryHistoryKeepDays.Text)); AppSettings.WriteBool(asLogHorizontalScrollbar, chkHorizontalScrollbar.Checked); AppSettings.WriteBool(asLogTimestamp, chkLogTimestamp.Checked); for i:=0 to SynSQLSynSQLSample.AttrCount - 1 do begin @@ -338,16 +324,16 @@ begin AppSettings.WriteString(asSQLColMatchingBraceForeground, ColorToString(MainForm.MatchingBraceForegroundColor)); AppSettings.WriteString(asSQLColMatchingBraceBackground, ColorToString(MainForm.MatchingBraceBackgroundColor)); - AppSettings.WriteInt(asMaxColWidth, updownMaxColWidth.Position); + AppSettings.WriteInt(asMaxColWidth, MakeInt(editMaxColWidth.Text)); AppSettings.WriteInt(asDatagridRowsPerStep, StrToIntDef(editGridRowCountStep.Text, -1)); AppSettings.WriteInt(asDatagridMaximumRows, StrToIntDef(editGridRowCountMax.Text, -1)); - AppSettings.WriteInt(asGridRowLineCount, updownGridRowsLineCount.Position); + AppSettings.WriteInt(asGridRowLineCount, MakeInt(editGridRowsLineCount.Text)); AppSettings.WriteString(asDataFontName, comboDataFontName.Text); - AppSettings.WriteInt(asDataFontSize, updownDataFontSize.Position); + AppSettings.WriteInt(asDataFontSize, MakeInt(editDataFontSize.Text)); AppSettings.WriteBool(asLogToFile, chkLogToFile.Checked); AppSettings.WriteBool(asUpdatecheck, chkUpdatecheck.Checked); AppSettings.WriteBool(asUpdatecheckBuilds, chkUpdatecheckBuilds.Checked); - AppSettings.WriteInt(asUpdatecheckInterval, updownUpdatecheckInterval.Position); + AppSettings.WriteInt(asUpdatecheckInterval, MakeInt(editUpdatecheckInterval.Text)); AppSettings.WriteBool(asDoUsageStatistics, chkDoStatistics.Checked); AppSettings.WriteBool(asWheelZoom, chkWheelZoom.Checked); AppSettings.WriteBool(asDisplayBars, chkColorBars.Checked); @@ -366,12 +352,12 @@ begin AppSettings.WriteString(asGUIFontName, '') else AppSettings.WriteString(asGUIFontName, comboGUIFont.Text); - AppSettings.WriteInt(asGUIFontSize, updownGUIFontSize.Position); + AppSettings.WriteInt(asGUIFontSize, MakeInt(editGUIFontSize.Text)); AppSettings.WriteString(asTheme, comboTheme.Text); AppSettings.WriteString(asIconPack, comboIconPack.Text); AppSettings.WriteString(asWebSearchBaseUrl, comboWebSearchBaseUrl.Text); - AppSettings.WriteInt(asMaxQueryResults, updownMaxQueryResults.Position); + AppSettings.WriteInt(asMaxQueryResults, MakeInt(editMaxQueryResults.Text)); // Save color settings AppSettings.WriteInt(asFieldColorNumeric, FGridTextColors[dtcInteger]); AppSettings.WriteInt(asFieldColorReal, FGridTextColors[dtcReal]); @@ -384,8 +370,8 @@ begin AppSettings.WriteInt(asRowBackgroundEven, cboxRowBackgroundEven.Selected); AppSettings.WriteInt(asRowBackgroundOdd, cboxRowBackgroundOdd.Selected); AppSettings.WriteInt(asHightlightSameTextBackground, cboxRowHighlightSameText.Selected); - AppSettings.WriteInt(asRealTrailingZeros, updownRealTrailingZeros.Position); - AppSettings.WriteInt(asQueryGridLongSortRowNum, updownLongSortRowNum.Position); + AppSettings.WriteInt(asRealTrailingZeros, MakeInt(editRealTrailingZeros.Text)); + AppSettings.WriteInt(asQueryGridLongSortRowNum, MakeInt(editLongSortRowNum.Text)); AppSettings.WriteBool(asDataLocalNumberFormat, chkLocalNumberFormat.Checked); AppSettings.WriteBool(asLowercaseHex, chkLowercaseHex.Checked); AppSettings.WriteBool(asHintsOnResultTabs, chkHintsOnResultTabs.Checked); @@ -408,7 +394,7 @@ begin end; AppSettings.WriteBool(asCompletionProposal, chkCompletionProposal.Checked); - AppSettings.WriteInt(asCompletionProposalInterval, updownCompletionProposalInterval.Position); + AppSettings.WriteInt(asCompletionProposalInterval, MakeInt(editCompletionProposalInterval.Text)); AppSettings.WriteBool(asCompletionProposalSearchOnMid, chkCompletionProposalSearchOnMid.Checked); AppSettings.WriteBool(asAutoUppercase, chkAutoUppercase.Checked); AppSettings.WriteBool(asTabsToSpaces, chkTabsToSpaces.Checked); @@ -561,8 +547,6 @@ begin //EnumFontFamilies(Canvas.Handle, nil, @EnumFixedProc, LPARAM(Pointer(comboSQLFontName.Items))); comboSQLFontName.Items.Assign(Screen.Fonts); comboSQLFontName.Sorted := True; - updownCompletionProposalInterval.Min := 0; - updownCompletionProposalInterval.Max := MaxInt; SynMemoSQLSample.Text := 'SELECT DATE_SUB(NOW(), INTERVAL 1 DAY),' + sLineBreak + CodeIndent + '''String literal'' AS lit' + sLineBreak + 'FROM tableA AS ta' + sLineBreak + @@ -702,7 +686,7 @@ begin chkRestoreLastDB.Checked := AppSettings.ReadBool(asRestoreLastUsedDB); chkUpdatecheck.Checked := AppSettings.ReadBool(asUpdatecheck); chkUpdatecheckBuilds.Checked := AppSettings.ReadBool(asUpdatecheckBuilds); - updownUpdatecheckInterval.Position := AppSettings.ReadInt(asUpdatecheckInterval); + editUpdatecheckInterval.Text := AppSettings.ReadInt(asUpdatecheckInterval).ToString; chkUpdatecheckClick(Sender); chkDoStatistics.Checked := AppSettings.ReadBool(asDoUsageStatistics); chkWheelZoom.Checked := AppSettings.ReadBool(asWheelZoom); @@ -723,15 +707,15 @@ begin comboGUIFont.ItemIndex := 0 else comboGUIFont.ItemIndex := comboGUIFont.Items.IndexOf(GUIFont); - updownGUIFontSize.Position := AppSettings.ReadInt(asGUIFontSize); + editGUIFontSize.Text := AppSettings.ReadInt(asGUIFontSize).ToString; comboGUIFont.OnChange(comboGUIFont); comboTheme.ItemIndex := comboTheme.Items.IndexOf(AppSettings.ReadString(asTheme)); comboIconPack.ItemIndex := comboIconPack.Items.IndexOf(AppSettings.ReadString(asIconPack)); comboWebSearchBaseUrl.Text := AppSettings.ReadString(asWebSearchBaseUrl); // Logging - updownLogLines.Position := AppSettings.ReadInt(asLogsqlnum); - updownLogSnip.Position := AppSettings.ReadInt(asLogsqlwidth); + editLogLines.Text := AppSettings.ReadInt(asLogsqlnum).ToString; + editLogSnip.Text := AppSettings.ReadInt(asLogsqlwidth).ToString; chkLogToFile.Checked := AppSettings.ReadBool(asLogToFile); editLogDir.Text := AppSettings.ReadString(asSessionLogsDirectory); chkLogEventErrors.Checked := AppSettings.ReadBool(asLogErrors); @@ -741,23 +725,23 @@ begin chkLogEventInfo.Checked := AppSettings.ReadBool(asLogInfos); chkLogEventDebug.Checked := AppSettings.ReadBool(asLogDebug); chkQueryHistory.Checked := AppSettings.ReadBool(asQueryHistoryEnabled); - updownQueryHistoryKeepDays.Position := AppSettings.ReadInt(asQueryHistoryKeepDays); + editQueryHistoryKeepDays.Text := AppSettings.ReadInt(asQueryHistoryKeepDays).ToString; chkHorizontalScrollbar.Checked := AppSettings.ReadBool(asLogHorizontalScrollbar); chkLogTimestamp.Checked := AppSettings.ReadBool(asLogTimestamp); // Default column width in grids: - updownMaxColWidth.Position := AppSettings.ReadInt(asMaxColWidth); + editMaxColWidth.Text := AppSettings.ReadInt(asMaxColWidth).ToString; editGridRowCountStep.Text := IntToStr(AppSettings.ReadInt(asDatagridRowsPerStep)); editGridRowCountMax.Text := IntToStr(AppSettings.ReadInt(asDatagridMaximumRows)); - updownGridRowsLineCount.Position := AppSettings.ReadInt(asGridRowLineCount); + editGridRowsLineCount.Text := AppSettings.ReadInt(asGridRowLineCount).ToString; // SQL: Mainform.SetupSynEditor(SynMemoSQLSample); comboSQLFontName.ItemIndex := comboSQLFontName.Items.IndexOf(SynMemoSQLSample.Font.Name); - updownSQLFontSize.Position := SynMemoSQLSample.Font.Size; - updownSQLTabWidth.Position := SynMemoSQLSample.TabWidth; + editSQLFontSize.Text := SynMemoSQLSample.Font.Size.ToString; + editSQLTabWidth.Text := SynMemoSQLSample.TabWidth.ToString; chkCompletionProposal.Checked := AppSettings.ReadBool(asCompletionProposal); - updownCompletionProposalInterval.Position := AppSettings.ReadInt(asCompletionProposalInterval); + editCompletionProposalInterval.Text := AppSettings.ReadInt(asCompletionProposalInterval).ToString; chkCompletionProposalSearchOnMid.Checked := AppSettings.ReadBool(asCompletionProposalSearchOnMid); chkAutoUppercase.Checked := AppSettings.ReadBool(asAutoUppercase); chkTabsToSpaces.Checked := AppSettings.ReadBool(asTabsToSpaces); @@ -766,8 +750,8 @@ begin // Grid formatting: comboDataFontName.Items := Screen.Fonts; comboDataFontName.ItemIndex := comboDataFontName.Items.IndexOf(AppSettings.ReadString(asDataFontName)); - updownDataFontSize.Position := AppSettings.ReadInt(asDataFontSize); - updownMaxQueryResults.Position := AppSettings.ReadINt(asMaxQueryResults); + editDataFontSize.Text := AppSettings.ReadInt(asDataFontSize).ToString; + editMaxQueryResults.Text := AppSettings.ReadINt(asMaxQueryResults).ToString; // Load color settings FGridTextColors[dtcInteger] := AppSettings.ReadInt(asFieldColorNumeric); FGridTextColors[dtcReal] := AppSettings.ReadInt(asFieldColorReal); @@ -783,8 +767,8 @@ begin cboxRowBackgroundEven.Selected := AppSettings.ReadInt(asRowBackgroundEven); cboxRowBackgroundOdd.Selected := AppSettings.ReadInt(asRowBackgroundOdd); cboxRowHighlightSameText.Selected := AppSettings.ReadInt(asHightlightSameTextBackground); - updownRealTrailingZeros.Position := AppSettings.ReadInt(asRealTrailingZeros); - updownLongSortRowNum.Position := AppSettings.ReadInt(asQueryGridLongSortRowNum); + editRealTrailingZeros.Text := AppSettings.ReadInt(asRealTrailingZeros).ToString; + editLongSortRowNum.Text := AppSettings.ReadInt(asQueryGridLongSortRowNum).ToString; chkLocalNumberFormat.Checked := AppSettings.ReadBool(asDataLocalNumberFormat); chkLowercaseHex.Checked := AppSettings.ReadBool(asLowercaseHex); chkHintsOnResultTabs.Checked := AppSettings.ReadBool(asHintsOnResultTabs); @@ -836,9 +820,10 @@ var Attri: TSynHighlighterAttributes; Foreground, Background: TColor; begin - SynMemoSQLSample.Font.Name := comboSQLFontName.Items[comboSQLFontName.ItemIndex]; - SynMemoSQLSample.Font.Size := updownSQLFontSize.Position; - SynMemoSQLSample.TabWidth := updownSQLTabWidth.Position; + if comboSQLFontName.ItemIndex > -1 then + SynMemoSQLSample.Font.Name := comboSQLFontName.Items[comboSQLFontName.ItemIndex]; + SynMemoSQLSample.Font.Size := MakeInt(editSQLFontSize.Text); + SynMemoSQLSample.TabWidth := MakeInt(editSQLTabWidth.Text); AttriIdx := comboSQLColElement.ItemIndex; Foreground := cboxSQLColForeground.Selected; Background := cboxSQLColBackground.Selected; @@ -931,7 +916,6 @@ end; } procedure TfrmPreferences.chkUpdatecheckClick(Sender: TObject); begin - updownUpdatecheckInterval.Enabled := chkUpdatecheck.Checked; editUpdatecheckInterval.Enabled := chkUpdatecheck.Checked; chkUpdatecheckBuilds.Enabled := chkUpdatecheck.Checked; Modified(Sender); @@ -944,7 +928,6 @@ var begin Enable := TCheckBox(Sender).Checked; editCompletionProposalInterval.Enabled := Enable; - updownCompletionProposalInterval.Enabled := Enable; lblCompletionProposalIntervalUnit.Enabled := Enable; chkCompletionProposalSearchOnMid.Enabled := Enable; Modified(Sender); @@ -960,7 +943,6 @@ end; procedure TfrmPreferences.chkQueryHistoryClick(Sender: TObject); begin editQueryHistoryKeepDays.Enabled := chkQueryHistory.Checked; - updownQueryHistoryKeepDays.Enabled := chkQueryHistory.Checked; lblQueryHistoryKeepDays.Enabled := chkQueryHistory.Checked; Modified(Sender); end; @@ -1047,7 +1029,6 @@ begin // System font selected UseCustomFont := comboGUIFont.ItemIndex > 0; editGUIFontSize.Enabled := UseCustomFont; - updownGUIFontSize.Enabled := UseCustomFont; lblGUIFontSize.Enabled := UseCustomFont; Modified(Sender); end; diff --git a/source/printlist.lfm b/source/printlist.lfm index fac28833..04045183 100644 --- a/source/printlist.lfm +++ b/source/printlist.lfm @@ -13,18 +13,20 @@ object printlistForm: TprintlistForm Position = poMainFormCenter object lblSelect: TLabel Left = 10 - Height = 18 + Height = 20 Top = 14 - Width = 89 + Width = 91 + BorderSpacing.Around = 6 Caption = '&Select printer:' FocusControl = comboPrinters end object comboPrinters: TComboBox Left = 102 - Height = 26 + Height = 28 Top = 10 Width = 258 - ItemHeight = 18 + BorderSpacing.Around = 6 + ItemHeight = 20 Style = csDropDownList TabOrder = 0 OnChange = comboPrintersChange @@ -34,6 +36,7 @@ object printlistForm: TprintlistForm Height = 31 Top = 10 Width = 94 + BorderSpacing.Around = 6 Caption = 'Configure' TabOrder = 1 OnClick = btnConfigureClick @@ -44,6 +47,7 @@ object printlistForm: TprintlistForm Top = 74 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' ModalResult = 2 @@ -55,6 +59,7 @@ object printlistForm: TprintlistForm Top = 74 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Print' Default = True ModalResult = 1 @@ -62,11 +67,14 @@ object printlistForm: TprintlistForm OnClick = btnPrintClick end object chkPrintHeader: TCheckBox + AnchorSideTop.Control = comboPrinters + AnchorSideTop.Side = asrBottom Left = 102 - Height = 22 - Top = 45 + Height = 24 + Top = 44 Width = 258 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Print column headers' Checked = True State = cbChecked diff --git a/source/reformatter.lfm b/source/reformatter.lfm index 339c1cde..1e15efc4 100644 --- a/source/reformatter.lfm +++ b/source/reformatter.lfm @@ -45,6 +45,7 @@ object frmReformatter: TfrmReformatter Top = 230 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' ModalResult = 2 @@ -63,6 +64,8 @@ object frmReformatter: TfrmReformatter OnClick = btnOkClick end object lblFormatProviderLink: TLabel + AnchorSideTop.Control = grpReformatter + AnchorSideTop.Side = asrBottom Cursor = crHandPoint Left = 10 Height = 20 diff --git a/source/searchreplace.lfm b/source/searchreplace.lfm index 87681e33..6e6dfc1a 100644 --- a/source/searchreplace.lfm +++ b/source/searchreplace.lfm @@ -17,27 +17,35 @@ object frmSearchReplace: TfrmSearchReplace OnShow = FormShow Position = poOwnerFormCenter object lblSearch: TLabel + AnchorSideTop.Control = comboSearchIn + AnchorSideTop.Side = asrBottom Left = 10 Height = 20 - Top = 50 + Top = 40 Width = 78 + BorderSpacing.Around = 6 Caption = '&Text to find:' FocusControl = comboSearch end object lblReplaceHint: TLabel + AnchorSideTop.Control = comboReplace + AnchorSideTop.Side = asrBottom Left = 112 Height = 20 - Top = 109 + Top = 108 Width = 324 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Replacement can have \n for new lines and \t for tabs' Enabled = False end object lblSearchIn: TLabel + AnchorSideTop.Control = Owner Left = 10 Height = 20 - Top = 16 + Top = 6 Width = 63 + BorderSpacing.Around = 6 Caption = 'Search in:' end object btnCancel: TButton @@ -63,20 +71,26 @@ object frmSearchReplace: TfrmSearchReplace OnClick = DoSearchReplace end object chkReplace: TCheckBox + AnchorSideTop.Control = comboSearch + AnchorSideTop.Side = asrBottom Left = 10 Height = 24 - Top = 80 + Top = 74 Width = 77 + BorderSpacing.Around = 6 Caption = '&Replace:' TabOrder = 3 OnClick = chkReplaceClick end object comboSearch: TComboBox + AnchorSideTop.Control = comboSearchIn + AnchorSideTop.Side = asrBottom Left = 112 Height = 28 - Top = 46 + Top = 40 Width = 381 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 TabOrder = 1 Text = 'comboSearch' @@ -84,11 +98,14 @@ object frmSearchReplace: TfrmSearchReplace OnExit = comboSearchReplaceExit end object comboReplace: TComboBox + AnchorSideTop.Control = comboSearch + AnchorSideTop.Side = asrBottom Left = 112 Height = 28 - Top = 78 + Top = 74 Width = 381 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Enabled = False ItemHeight = 20 TabOrder = 4 @@ -97,11 +114,14 @@ object frmSearchReplace: TfrmSearchReplace OnExit = comboSearchReplaceExit end object grpOptions: TGroupBox + AnchorSideTop.Control = lblReplaceHint + AnchorSideTop.Side = asrBottom Left = 10 Height = 86 - Top = 136 + Top = 134 Width = 522 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = '&Options' ClientHeight = 61 ClientWidth = 518 @@ -144,9 +164,11 @@ object frmSearchReplace: TfrmSearchReplace end end object grpDirection: TRadioGroup + AnchorSideTop.Control = grpOptions + AnchorSideTop.Side = asrBottom Left = 10 - Height = 110 - Top = 230 + Height = 114 + Top = 226 Width = 150 Anchors = [akTop, akLeft, akBottom] AutoFill = True @@ -158,7 +180,7 @@ object frmSearchReplace: TfrmSearchReplace ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 85 + ClientHeight = 89 ClientWidth = 146 ItemIndex = 0 Items.Strings = ( @@ -169,9 +191,11 @@ object frmSearchReplace: TfrmSearchReplace TabOrder = 7 end object grpOrigin: TRadioGroup + AnchorSideTop.Control = grpOptions + AnchorSideTop.Side = asrBottom Left = 168 - Height = 110 - Top = 230 + Height = 114 + Top = 226 Width = 150 Anchors = [akTop, akLeft, akBottom] AutoFill = True @@ -183,7 +207,7 @@ object frmSearchReplace: TfrmSearchReplace ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 85 + ClientHeight = 89 ClientWidth = 146 ItemIndex = 1 Items.Strings = ( @@ -194,9 +218,11 @@ object frmSearchReplace: TfrmSearchReplace TabOrder = 8 end object grpScope: TRadioGroup + AnchorSideTop.Control = grpOptions + AnchorSideTop.Side = asrBottom Left = 325 - Height = 110 - Top = 230 + Height = 114 + Top = 226 Width = 207 Anchors = [akTop, akLeft, akRight, akBottom] AutoFill = True @@ -208,7 +234,7 @@ object frmSearchReplace: TfrmSearchReplace ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 85 + ClientHeight = 89 ClientWidth = 203 ItemIndex = 0 Items.Strings = ( @@ -231,31 +257,39 @@ object frmSearchReplace: TfrmSearchReplace OnClick = DoSearchReplace end object comboSearchIn: TComboBox + AnchorSideTop.Control = Owner Left = 112 Height = 28 - Top = 12 + Top = 6 Width = 420 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 Style = csDropDownList TabOrder = 0 end object btnSearchHints: TButton + AnchorSideTop.Control = comboSearchIn + AnchorSideTop.Side = asrBottom Left = 501 Height = 31 - Top = 44 + Top = 40 Width = 31 Anchors = [akTop, akRight] + BorderSpacing.Around = 6 Caption = '⏷' TabOrder = 2 OnClick = btnWithDropDownClick end object btnReplaceHints: TButton + AnchorSideTop.Control = comboSearch + AnchorSideTop.Side = asrBottom Left = 501 Height = 31 - Top = 75 + Top = 74 Width = 31 Anchors = [akTop, akRight] + BorderSpacing.Around = 6 Caption = '⏷' Enabled = False TabOrder = 5 diff --git a/source/selectdbobject.lfm b/source/selectdbobject.lfm index 70a63867..c9fbc6de 100644 --- a/source/selectdbobject.lfm +++ b/source/selectdbobject.lfm @@ -16,25 +16,31 @@ object frmSelectDBObject: TfrmSelectDBObject Position = poOwnerFormCenter object lblSelect: TLabel Left = 10 - Height = 18 + Height = 20 Top = 10 - Width = 218 + Width = 220 + BorderSpacing.Around = 6 Caption = 'Select database, table or column:' end object lblCustom: TLabel + AnchorSideBottom.Control = editDb Left = 10 - Height = 18 - Top = 297 - Width = 283 + Height = 20 + Top = 294 + Width = 278 Anchors = [akLeft, akBottom] + BorderSpacing.Around = 6 Caption = '... or wildcard database (% and _ allowed):' end object TreeDBO: TLazVirtualStringTree + AnchorSideTop.Control = lblSelect + AnchorSideTop.Side = asrBottom Left = 10 - Height = 257 - Top = 34 + Height = 255 + Top = 36 Width = 270 Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Header.AutoSizeIndex = 0 Header.Columns = < item @@ -69,6 +75,7 @@ object frmSelectDBObject: TfrmSelectDBObject Top = 354 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'OK' Default = True Enabled = False @@ -81,17 +88,20 @@ object frmSelectDBObject: TfrmSelectDBObject Top = 354 Width = 94 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' ModalResult = 2 TabOrder = 3 end object editDb: TEdit + AnchorSideBottom.Control = btnOK Left = 10 - Height = 26 - Top = 319 + Height = 28 + Top = 320 Width = 270 Anchors = [akLeft, akRight, akBottom] + BorderSpacing.Around = 6 TabOrder = 1 Text = 'editDb' TextHint = 'database' diff --git a/source/texteditor.lfm b/source/texteditor.lfm index 52b9fd50..9f4dff28 100644 --- a/source/texteditor.lfm +++ b/source/texteditor.lfm @@ -15,24 +15,22 @@ object frmTextEditor: TfrmTextEditor OnDestroy = FormDestroy OnShow = FormShow Position = poMainFormCenter - LCLVersion = '3.8.0.0' object Panel1: TPanel Left = 0 Height = 28 - Top = 125 - Width = 472 + Top = 163 + Width = 602 Align = alBottom BevelOuter = bvNone - Caption = 'Panel1' ClientHeight = 28 - ClientWidth = 472 + ClientWidth = 602 ParentBackground = False TabOrder = 0 object lblTextLength: TLabel - Left = 409 - Height = 16 - Top = 3 - Width = 76 + Left = 211 + Height = 28 + Top = 0 + Width = 89 Align = alLeft Caption = 'lblTextLength' Layout = tlCenter @@ -40,91 +38,90 @@ object frmTextEditor: TfrmTextEditor end object tlbStandard: TToolBar Left = 0 - Height = 22 + Height = 28 Top = 0 - Width = 261 + Width = 30 Align = alLeft AutoSize = True Caption = 'tlbStandard' - Images = MainForm.ImageListIcons8 ParentShowHint = False ShowHint = True TabOrder = 0 Wrapable = False object btnWrap: TToolButton - Left = 0 + Left = 1 Hint = 'Wrap long lines' - Top = 0 + Top = 2 Caption = 'Wrap long lines' ImageIndex = 62 OnClick = btnWrapClick end object btnLinebreaks: TToolButton - Left = 29 - Top = 0 + Left = 1 + Top = 30 Caption = 'Linebreaks' DropdownMenu = popupLinebreaks ImageIndex = 123 Style = tbsDropDown end object btnLoadText: TToolButton - Left = 81 + Left = 1 Hint = 'Load textfile' - Top = 0 + Top = 58 Caption = 'Load textfile' ImageIndex = 52 OnClick = btnLoadTextClick end object btnCancel: TToolButton - Left = 110 + Left = 1 Hint = 'Cancel' - Top = 0 + Top = 86 Caption = 'Cancel' ImageIndex = 26 OnClick = btnCancelClick end object btnApply: TToolButton - Left = 139 + Left = 1 Hint = 'Apply changes' - Top = 0 + Top = 114 Caption = 'Apply changes' ImageIndex = 55 OnClick = btnApplyClick end object btnSeparator1: TToolButton - Left = 168 - Top = 0 - Width = 10 + Left = 1 + Top = 142 + Width = 29 Caption = 'btnSeparator1' ImageIndex = 60 Style = tbsSeparator end object btnSearchFind: TToolButton - Left = 178 - Top = 0 + Left = 1 + Top = 152 Action = MainForm.actQueryFind end object btnSearchFindNext: TToolButton - Left = 206 - Top = 0 + Left = 1 + Top = 180 Action = MainForm.actQueryFindAgain end object btnSearchReplace: TToolButton - Left = 235 - Top = 0 + Left = 1 + Top = 208 Action = MainForm.actQueryReplace end object ToolButton1: TToolButton - Left = 264 - Top = 0 - Width = 10 + Left = 1 + Top = 236 + Width = 29 Caption = 'ToolButton1' ImageIndex = 60 Style = tbsSeparator end object btnCustomizeHighlighter: TToolButton - Left = 274 - Top = 0 + Left = 1 + Top = 246 Caption = 'Customize highlighter' DropdownMenu = popupHighlighter ImageIndex = 39 @@ -133,12 +130,12 @@ object frmTextEditor: TfrmTextEditor end end object comboHighlighter: TComboBox - Left = 261 - Height = 22 + Left = 30 + Height = 28 Top = 0 Width = 181 Align = alLeft - ItemHeight = 0 + ItemHeight = 20 Sorted = True Style = csDropDownList TabOrder = 1 @@ -147,9 +144,9 @@ object frmTextEditor: TfrmTextEditor end inline MemoText: TSynEdit Left = 0 - Height = 131 + Height = 163 Top = 0 - Width = 482 + Width = 602 Align = alClient Font.Color = clWindowText Font.Height = -16 @@ -234,7 +231,6 @@ object frmTextEditor: TfrmTextEditor end end object popupLinebreaks: TPopupMenu - Images = MainForm.ImageListIcons8 Left = 10 Top = 20 object menuWindowsLB: TMenuItem @@ -270,7 +266,6 @@ object frmTextEditor: TfrmTextEditor Top = 20 end object popupEditor: TPopupMenu - Images = MainForm.ImageListIcons8 Left = 300 Top = 20 object Selectall1: TMenuItem @@ -299,7 +294,6 @@ object frmTextEditor: TfrmTextEditor end end object popupHighlighter: TPopupMenu - Images = MainForm.ImageListIcons8 Left = 440 Top = 40 object menuCustomizeHighlighter: TMenuItem diff --git a/source/updatecheck.lfm b/source/updatecheck.lfm index ae97db87..cd19f8dc 100644 --- a/source/updatecheck.lfm +++ b/source/updatecheck.lfm @@ -21,6 +21,7 @@ object frmUpdateCheck: TfrmUpdateCheck Width = 262 Anchors = [akLeft, akRight, akBottom] AutoSize = False + BorderSpacing.Around = 6 Caption = 'lblStatus' Layout = tlCenter WordWrap = True @@ -31,6 +32,7 @@ object frmUpdateCheck: TfrmUpdateCheck Top = 464 Width = 132 Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 Cancel = True Caption = 'Cancel' Default = True @@ -38,22 +40,25 @@ object frmUpdateCheck: TfrmUpdateCheck TabOrder = 3 end object groupBuild: TGroupBox + AnchorSideBottom.Control = btnCancel Left = 10 - Height = 215 + Height = 218 Top = 240 Width = 430 Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Nightly build' - ClientHeight = 190 + ClientHeight = 193 ClientWidth = 426 ParentBackground = False TabOrder = 2 object btnBuild: TButton Left = 8 Height = 31 - Top = 150 + Top = 153 Width = 409 Anchors = [akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'Download nightly build' Enabled = False ModalResult = 1 @@ -63,10 +68,11 @@ object frmUpdateCheck: TfrmUpdateCheck end object memoBuild: TMemo Left = 8 - Height = 90 - Top = 20 + Height = 93 + Top = 11 Width = 409 Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 BorderStyle = bsNone Color = clBtnFace Font.Color = clWindowText @@ -81,22 +87,27 @@ object frmUpdateCheck: TfrmUpdateCheck TabOrder = 0 end object btnChangelog: TButton + AnchorSideBottom.Control = btnBuild Left = 8 Height = 31 - Top = 111 + Top = 116 Width = 409 Anchors = [akLeft, akRight, akBottom] + BorderSpacing.Around = 6 Caption = 'View changelog' TabOrder = 1 OnClick = btnChangelogClick end end object groupRelease: TGroupBox + AnchorSideTop.Control = btnDonate + AnchorSideTop.Side = asrBottom Left = 10 Height = 122 - Top = 110 + Top = 108 Width = 430 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Official release' ClientHeight = 97 ClientWidth = 426 @@ -105,10 +116,11 @@ object frmUpdateCheck: TfrmUpdateCheck TabOrder = 1 object memoRelease: TMemo Left = 8 - Height = 41 - Top = 20 + Height = 59 + Top = 5 Width = 409 Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 BorderStyle = bsNone Color = clBtnFace Lines.Strings = ( @@ -125,6 +137,7 @@ object frmUpdateCheck: TfrmUpdateCheck Top = 72 Width = 151 Anchors = [akLeft, akBottom] + BorderSpacing.Around = 6 Caption = 'Download new release' PopupMenu = popupDownloadRelease OnClick = LinkLabelReleaseLinkClick @@ -136,6 +149,7 @@ object frmUpdateCheck: TfrmUpdateCheck Top = 10 Width = 430 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 Caption = 'Donate' TabOrder = 0 end diff --git a/source/usermanager.lfm b/source/usermanager.lfm index 2459e529..cf3f8aa3 100644 --- a/source/usermanager.lfm +++ b/source/usermanager.lfm @@ -19,20 +19,21 @@ object UserManagerForm: TUserManagerForm Position = poMainFormCenter object Splitter1: TSplitter Cursor = crSizeWE - Left = 280 - Height = 408 + Left = 292 + Height = 396 Top = 0 Width = 10 OnMoved = FormResize end object pnlLeft: TPanel - Left = 0 - Height = 408 - Top = 0 + Left = 6 + Height = 390 + Top = 6 Width = 280 Align = alLeft + BorderSpacing.Around = 6 BevelOuter = bvNone - ClientHeight = 408 + ClientHeight = 390 ClientWidth = 280 Constraints.MinWidth = 25 ParentBackground = False @@ -48,7 +49,7 @@ object UserManagerForm: TUserManagerForm end object listUsers: TLazVirtualStringTree Left = 0 - Height = 351 + Height = 333 Top = 57 Width = 280 Align = alClient @@ -123,14 +124,15 @@ object UserManagerForm: TUserManagerForm end end object pnlRight: TPanel - Left = 290 - Height = 408 - Top = 0 - Width = 494 + Left = 308 + Height = 390 + Top = 6 + Width = 470 Align = alClient + BorderSpacing.Around = 6 BevelOuter = bvNone - ClientHeight = 408 - ClientWidth = 494 + ClientHeight = 390 + ClientWidth = 470 Constraints.MinWidth = 25 ParentBackground = False TabOrder = 1 @@ -138,7 +140,7 @@ object UserManagerForm: TUserManagerForm Left = 0 Height = 37 Top = 181 - Width = 494 + Width = 470 AutoSize = True ButtonHeight = 35 ButtonWidth = 99 @@ -170,10 +172,12 @@ object UserManagerForm: TUserManagerForm end end object treePrivs: TLazVirtualStringTree + AnchorSideTop.Control = tlbObjects + AnchorSideTop.Side = asrBottom Left = 0 - Height = 190 + Height = 172 Top = 218 - Width = 494 + Width = 470 Align = alClient Header.AutoSizeIndex = 0 Header.Columns = <> @@ -196,7 +200,7 @@ object UserManagerForm: TUserManagerForm Left = 0 Height = 181 Top = 0 - Width = 494 + Width = 470 ActivePage = tabCredentials Align = alTop TabIndex = 0 @@ -204,55 +208,71 @@ object UserManagerForm: TUserManagerForm object tabCredentials: TTabSheet Caption = 'Credentials' ClientHeight = 148 - ClientWidth = 486 + ClientWidth = 462 object lblUsername: TLabel Left = 4 Height = 20 Top = 12 Width = 73 + BorderSpacing.Around = 6 Caption = 'User &name:' end object lblFromHost: TLabel + AnchorSideTop.Control = editUsername + AnchorSideTop.Side = asrBottom Left = 4 Height = 20 - Top = 46 + Top = 43 Width = 69 + BorderSpacing.Around = 6 Caption = 'From &host:' FocusControl = editFromHost end object lblPassword: TLabel + AnchorSideTop.Control = editFromHost + AnchorSideTop.Side = asrBottom Left = 4 Height = 20 - Top = 80 + Top = 77 Width = 64 + BorderSpacing.Around = 6 Caption = '&Password:' FocusControl = editPassword end object lblRepeatPassword: TLabel + AnchorSideTop.Control = editPassword + AnchorSideTop.Side = asrBottom Left = 4 Height = 20 - Top = 114 + Top = 111 Width = 117 + BorderSpacing.Around = 6 Caption = 'Repeat password:' FocusControl = editRepeatPassword end object editRepeatPassword: TEdit + AnchorSideTop.Control = editPassword + AnchorSideTop.Side = asrBottom Left = 220 Height = 28 - Top = 110 - Width = 260 + Top = 111 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 EchoMode = emPassword PasswordChar = '*' TabOrder = 3 OnChange = Modification end object editPassword: TEditButton + AnchorSideTop.Control = editFromHost + AnchorSideTop.Side = asrBottom Left = 220 Height = 28 - Top = 76 - Width = 260 + Top = 77 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 EchoMode = emPassword Images = MainForm.ImageListIcons8 @@ -265,11 +285,14 @@ object UserManagerForm: TUserManagerForm TabOrder = 2 end object editFromHost: TEditButton + AnchorSideTop.Control = editUsername + AnchorSideTop.Side = asrBottom Left = 220 Height = 28 - Top = 42 - Width = 260 + Top = 43 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ButtonWidth = 29 Images = MainForm.ImageListIcons8 ImageIndex = 75 @@ -284,8 +307,9 @@ object UserManagerForm: TUserManagerForm Left = 220 Height = 28 Top = 9 - Width = 260 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 TabOrder = 0 OnChange = Modification end @@ -293,160 +317,137 @@ object UserManagerForm: TUserManagerForm object tabLimitations: TTabSheet Caption = 'Limitations' ClientHeight = 148 - ClientWidth = 486 + ClientWidth = 462 ImageIndex = 1 object lblMaxQueries: TLabel + AnchorSideTop.Control = editMaxQueries Left = 4 Height = 20 - Top = 12 + Top = 15 Width = 113 + BorderSpacing.Around = 6 Caption = 'Queries per hour:' end object lblMaxUpdates: TLabel + AnchorSideTop.Control = editMaxQueries + AnchorSideTop.Side = asrBottom Left = 4 Height = 20 - Top = 46 + Top = 43 Width = 118 + BorderSpacing.Around = 6 Caption = 'Updates per hour:' end object lblMaxConnections: TLabel + AnchorSideTop.Control = editMaxUpdates + AnchorSideTop.Side = asrBottom Left = 4 Height = 20 - Top = 80 + Top = 77 Width = 144 + BorderSpacing.Around = 6 Caption = 'Connections per hour:' end object lblMaxUserConnections: TLabel + AnchorSideTop.Control = editMaxConnections + AnchorSideTop.Side = asrBottom Left = 4 Height = 20 - Top = 114 + Top = 111 Width = 175 + BorderSpacing.Around = 6 Caption = 'Simultaneous connections:' end object editMaxQueries: TEdit - Left = 240 + Left = 220 Height = 28 Top = 9 - Width = 220 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 NumbersOnly = True TabOrder = 0 Text = '0' OnChange = Modification end object editMaxUpdates: TEdit - Left = 240 + AnchorSideTop.Control = editMaxQueries + AnchorSideTop.Side = asrBottom + Left = 220 Height = 28 - Top = 42 - Width = 220 + Top = 43 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 + NumbersOnly = True + TabOrder = 1 + Text = '0' + OnChange = Modification + end + object editMaxConnections: TEdit + AnchorSideTop.Control = editMaxUpdates + AnchorSideTop.Side = asrBottom + Left = 220 + Height = 28 + Top = 77 + Width = 236 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 NumbersOnly = True TabOrder = 2 Text = '0' OnChange = Modification end - object editMaxConnections: TEdit - Left = 240 - Height = 28 - Top = 76 - Width = 220 - Anchors = [akTop, akLeft, akRight] - NumbersOnly = True - TabOrder = 4 - Text = '0' - OnChange = Modification - end object editMaxUserConnections: TEdit - Left = 240 + AnchorSideTop.Control = editMaxConnections + AnchorSideTop.Side = asrBottom + Left = 220 Height = 28 - Top = 110 - Width = 220 + Top = 111 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 NumbersOnly = True - TabOrder = 6 + TabOrder = 3 Text = '0' OnChange = Modification end - object udMaxQueries: TUpDown - Left = 460 - Height = 28 - Top = 9 - Width = 21 - Anchors = [akTop, akRight] - Associate = editMaxQueries - Max = -1 - Min = 0 - OnClick = udMaxQueriesClick - Position = 0 - TabOrder = 1 - Thousands = False - end - object udMaxUpdates: TUpDown - Left = 460 - Height = 28 - Top = 42 - Width = 21 - Anchors = [akTop, akRight] - Associate = editMaxUpdates - Max = -1 - Min = 0 - Position = 0 - TabOrder = 3 - Thousands = False - end - object udMaxConnections: TUpDown - Left = 460 - Height = 28 - Top = 76 - Width = 21 - Anchors = [akTop, akRight] - Associate = editMaxConnections - Max = -1 - Min = 0 - Position = 0 - TabOrder = 5 - Thousands = False - end - object udMaxUserConnections: TUpDown - Left = 460 - Height = 28 - Top = 110 - Width = 21 - Anchors = [akTop, akRight] - Associate = editMaxUserConnections - Max = -1 - Min = 0 - Position = 0 - TabOrder = 7 - Thousands = False - end end object tabSSL: TTabSheet Caption = 'SSL options' ClientHeight = 148 - ClientWidth = 486 + ClientWidth = 462 ImageIndex = 2 object lblCipher: TLabel + AnchorSideTop.Control = comboSSL + AnchorSideTop.Side = asrBottom Left = 4 Height = 20 - Top = 45 + Top = 42 Width = 46 + BorderSpacing.Around = 6 Caption = '&Cipher:' FocusControl = editCipher end object lblIssuer: TLabel + AnchorSideTop.Control = editCipher + AnchorSideTop.Side = asrBottom Left = 4 Height = 20 - Top = 78 + Top = 76 Width = 40 + BorderSpacing.Around = 6 Caption = '&Issuer:' FocusControl = editIssuer end object lblSubject: TLabel + AnchorSideTop.Control = editIssuer + AnchorSideTop.Side = asrBottom Left = 4 Height = 20 - Top = 111 + Top = 110 Width = 52 + BorderSpacing.Around = 6 Caption = '&Subject:' FocusControl = editSubject end @@ -455,34 +456,44 @@ object UserManagerForm: TUserManagerForm Height = 20 Top = 11 Width = 81 + BorderSpacing.Around = 6 Caption = '&Require SSL:' end object editCipher: TEdit + AnchorSideTop.Control = comboSSL + AnchorSideTop.Side = asrBottom Left = 220 Height = 28 - Top = 41 - Width = 260 + Top = 42 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 TabOrder = 1 Text = 'editCipher' OnChange = Modification end object editIssuer: TEdit + AnchorSideTop.Control = editCipher + AnchorSideTop.Side = asrBottom Left = 220 Height = 28 - Top = 74 - Width = 260 + Top = 76 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 TabOrder = 2 Text = 'editIssuer' OnChange = Modification end object editSubject: TEdit + AnchorSideTop.Control = editIssuer + AnchorSideTop.Side = asrBottom Left = 220 Height = 28 - Top = 108 - Width = 260 + Top = 110 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 TabOrder = 3 Text = 'editSubject' OnChange = Modification @@ -491,8 +502,9 @@ object UserManagerForm: TUserManagerForm Left = 220 Height = 28 Top = 8 - Width = 260 + Width = 236 Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 ItemHeight = 20 Items.Strings = ( 'No SSL or X509 requirements' @@ -508,17 +520,18 @@ object UserManagerForm: TUserManagerForm end end object pnlBottom: TPanel - Left = 0 + Left = 6 Height = 47 - Top = 408 - Width = 784 + Top = 402 + Width = 772 Align = alBottom + BorderSpacing.Around = 6 ClientHeight = 47 - ClientWidth = 784 + ClientWidth = 772 ParentBackground = False TabOrder = 3 object btnDiscard: TSpeedButton - Left = 529 + Left = 517 Height = 31 Top = 8 Width = 119 @@ -529,7 +542,7 @@ object UserManagerForm: TUserManagerForm OnClick = btnDiscardClick end object btnSave: TSpeedButton - Left = 403 + Left = 391 Height = 31 Top = 8 Width = 119 @@ -540,7 +553,7 @@ object UserManagerForm: TUserManagerForm OnClick = btnSaveClick end object btnCancel: TSpeedButton - Left = 655 + Left = 643 Height = 31 Top = 8 Width = 119 @@ -554,7 +567,7 @@ object UserManagerForm: TUserManagerForm Left = 10 Height = 30 Top = 8 - Width = 264 + Width = 252 Anchors = [akTop, akLeft, akRight] AutoSize = False Layout = tlCenter diff --git a/source/usermanager.pas b/source/usermanager.pas index 2d65a978..c7c90ffd 100644 --- a/source/usermanager.pas +++ b/source/usermanager.pas @@ -101,10 +101,6 @@ type editMaxUpdates: TEdit; editMaxConnections: TEdit; editMaxUserConnections: TEdit; - udMaxQueries: TUpDown; - udMaxUpdates: TUpDown; - udMaxConnections: TUpDown; - udMaxUserConnections: TUpDown; tabSSL: TTabSheet; lblCipher: TLabel; editCipher: TEdit; @@ -568,10 +564,10 @@ begin editPassword.Clear; editPassword.TextHint := ''; editRepeatPassword.Clear; - udMaxQueries.Position := 0; - udMaxUpdates.Position := 0; - udMaxConnections.Position := 0; - udMaxUserConnections.Position := 0; + editMaxQueries.Text := '0'; + editMaxUpdates.Text := '0'; + editMaxConnections.Text := '0'; + editMaxUserConnections.Text := '0'; comboSSL.ItemIndex := 0; comboSSL.OnChange(Sender); editCipher.Clear; @@ -748,10 +744,10 @@ begin rxTemp.Expression := '\bMAX_USER_CONNECTIONS\s+(\d+)\b'; if rxTemp.Exec(WithClause) then User.MaxUserConnections := MakeInt(rxTemp.Match[1]); - udMaxQueries.Position := User.MaxQueries; - udMaxUpdates.Position := User.MaxUpdates; - udMaxConnections.Position := User.MaxConnections; - udMaxUserConnections.Position := User.MaxUserConnections; + editMaxQueries.Text := User.MaxQueries.ToString; + editMaxUpdates.Text := User.MaxUpdates.ToString; + editMaxConnections.Text := User.MaxConnections.ToString; + editMaxUserConnections.Text := User.MaxUserConnections.ToString; end; if (P.OrgPrivs.Count = 0) and (P.DBObj.NodeType = lntTable) then @@ -818,16 +814,12 @@ begin tabLimitations.Enabled := UserSelected; editMaxQueries.Enabled := lblMaxQueries.Enabled; - udMaxQueries.Enabled := lblMaxQueries.Enabled; lblMaxUpdates.Enabled := lblMaxQueries.Enabled; editMaxUpdates.Enabled := lblMaxQueries.Enabled; - udMaxUpdates.Enabled := lblMaxQueries.Enabled; lblMaxConnections.Enabled := lblMaxQueries.Enabled; editMaxConnections.Enabled := lblMaxQueries.Enabled; - udMaxConnections.Enabled := lblMaxQueries.Enabled; lblMaxUserConnections.Enabled := UserSelected and (FConnection.ServerVersionInt >= 50003); editMaxUserConnections.Enabled := lblMaxUserConnections.Enabled; - udMaxUserConnections.Enabled := lblMaxUserConnections.Enabled; tabSSL.Enabled := UserSelected; comboSSL.Enabled := UserSelected; @@ -1341,14 +1333,14 @@ begin WithClauses.Add('GRANT OPTION'); if P.DBObj.NodeType = lntNone then begin // Apply resource limits only to global privilege - if udMaxQueries.Position <> FocusedUser.MaxQueries then - WithClauses.Add('MAX_QUERIES_PER_HOUR '+IntToStr(udMaxQueries.Position)); - if udMaxUpdates.Position <> FocusedUser.MaxUpdates then - WithClauses.Add('MAX_UPDATES_PER_HOUR '+IntToStr(udMaxUpdates.Position)); - if udMaxConnections.Position <> FocusedUser.MaxConnections then - WithClauses.Add('MAX_CONNECTIONS_PER_HOUR '+IntToStr(udMaxConnections.Position)); - if udMaxUserConnections.Position <> FocusedUser.MaxUserConnections then - WithClauses.Add('MAX_USER_CONNECTIONS '+IntToStr(udMaxUserConnections.Position)); + if editMaxQueries.Text <> FocusedUser.MaxQueries.ToString then + WithClauses.Add('MAX_QUERIES_PER_HOUR '+editMaxQueries.Text); + if editMaxUpdates.Text <> FocusedUser.MaxUpdates.ToString then + WithClauses.Add('MAX_UPDATES_PER_HOUR '+editMaxUpdates.Text); + if editMaxConnections.Text <> FocusedUser.MaxConnections.ToString then + WithClauses.Add('MAX_CONNECTIONS_PER_HOUR '+editMaxConnections.Text); + if editMaxUserConnections.Text <> FocusedUser.MaxUserConnections.ToString then + WithClauses.Add('MAX_USER_CONNECTIONS '+editMaxUserConnections.Text); end; if WithClauses.Count > 0 then Grant := Grant + ' WITH ' + Implode(' ', WithClauses);