JCF2, Global Settings dialog: improved i18n and layout

This commit is contained in:
Maxim Ganetsky 2024-01-29 20:17:12 +03:00
parent 9035cf4f5d
commit 090ada5a0a
3 changed files with 66 additions and 70 deletions

View File

@ -360,9 +360,9 @@ resourcestring
lisCnfLogFile='File'; lisCnfLogFile='File';
lisCnfLogToken='Token'; lisCnfLogToken='Token';
lisCnfLogFileDir='Log file directory'; lisCnfLogFileDir='Log file directory';
lisCnfLogTemp='Temp'; lisCnfLogTemp='Temp: %s';
lisCnfLogApplication='Application'; lisCnfLogApplication='Application: %s';
lisCnfLogSpecified='Specified'; lisCnfLogSpecified='Specified: %s';
lisCnfLogSelectDir='Select specified directory'; lisCnfLogSelectDir='Select specified directory';
lisCnfLogViewLog='View log after each run'; lisCnfLogViewLog='View log after each run';
lisCnfLogTime='Log time taken to process'; lisCnfLogTime='Log time taken to process';

View File

@ -8,15 +8,13 @@ object fmRegistrySettings: TfmRegistrySettings
ClientHeight = 389 ClientHeight = 389
ClientWidth = 771 ClientWidth = 771
Color = clBtnFace Color = clBtnFace
DesignTimePPI = 120
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '3.99.0.0'
Scaled = False Scaled = False
OnCreate = FormCreate OnCreate = FormCreate
OnResize = FormResize OnResize = FormResize
object pgPages: TPageControl object pgPages: TPageControl
Left = 0 Left = 0
Height = 343 Height = 335
Top = 0 Top = 0
Width = 771 Width = 771
ActivePage = tsGeneral ActivePage = tsGeneral
@ -25,12 +23,12 @@ object fmRegistrySettings: TfmRegistrySettings
TabOrder = 0 TabOrder = 0
object tsGeneral: TTabSheet object tsGeneral: TTabSheet
Caption = '&General' Caption = '&General'
ClientHeight = 310 ClientHeight = 305
ClientWidth = 763 ClientWidth = 761
object sbFile: TSpeedButton object sbFile: TSpeedButton
AnchorSideLeft.Control = eSettingsFile AnchorSideLeft.Control = eSettingsFile
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
Left = 639 Left = 625
Height = 25 Height = 25
Top = 13 Top = 13
Width = 28 Width = 28
@ -40,24 +38,24 @@ object fmRegistrySettings: TfmRegistrySettings
end end
object Label1: TLabel object Label1: TLabel
Left = 11 Left = 11
Height = 20 Height = 16
Top = 12 Top = 12
Width = 131 Width = 117
Caption = 'Convert settings file' Caption = 'Convert settings file'
end end
object Label2: TLabel object Label2: TLabel
Left = 11 Left = 11
Height = 20 Height = 16
Top = 252 Top = 252
Width = 104 Width = 96
Caption = 'MRU max items' Caption = 'MRU max items'
Visible = False Visible = False
end end
object eSettingsFile: TEdit object eSettingsFile: TEdit
AnchorSideLeft.Control = Label1 AnchorSideLeft.Control = Label1
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
Left = 148 Left = 134
Height = 28 Height = 33
Top = 11 Top = 11
Width = 485 Width = 485
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -67,7 +65,7 @@ object fmRegistrySettings: TfmRegistrySettings
object btnClearMRU: TButton object btnClearMRU: TButton
AnchorSideLeft.Control = eMRUMaxItems AnchorSideLeft.Control = eMRUMaxItems
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
Left = 184 Left = 176
Height = 25 Height = 25
Top = 250 Top = 250
Width = 92 Width = 92
@ -91,8 +89,8 @@ object fmRegistrySettings: TfmRegistrySettings
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 67 ClientHeight = 75
ClientWidth = 366 ClientWidth = 368
Items.Strings = ( Items.Strings = (
'&Always' '&Always'
'&On parse error' '&On parse error'
@ -115,8 +113,8 @@ object fmRegistrySettings: TfmRegistrySettings
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 69 ClientHeight = 77
ClientWidth = 366 ClientWidth = 368
Items.Strings = ( Items.Strings = (
'&Always' '&Always'
'&Fail quietly' '&Fail quietly'
@ -127,9 +125,9 @@ object fmRegistrySettings: TfmRegistrySettings
end end
object cbCheckMultibyteChars: TCheckBox object cbCheckMultibyteChars: TCheckBox
Left = 411 Left = 411
Height = 24 Height = 23
Top = 49 Top = 49
Width = 188 Width = 176
Caption = 'Check for &multibyte chars' Caption = 'Check for &multibyte chars'
TabOrder = 4 TabOrder = 4
Visible = False Visible = False
@ -137,8 +135,8 @@ object fmRegistrySettings: TfmRegistrySettings
object eMRUMaxItems: TSpinEdit object eMRUMaxItems: TSpinEdit
AnchorSideLeft.Control = Label2 AnchorSideLeft.Control = Label2
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
Left = 121 Left = 113
Height = 28 Height = 33
Top = 248 Top = 248
Width = 57 Width = 57
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -148,13 +146,13 @@ object fmRegistrySettings: TfmRegistrySettings
end end
object tsLogFile: TTabSheet object tsLogFile: TTabSheet
Caption = '&Log file' Caption = '&Log file'
ClientHeight = 310 ClientHeight = 305
ClientWidth = 763 ClientWidth = 761
ImageIndex = 1 ImageIndex = 1
object sbSpecifedDir: TSpeedButton object sbSpecifedDir: TSpeedButton
AnchorSideLeft.Control = Label3 AnchorSideLeft.Control = Label3
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
Left = 180 Left = 160
Height = 25 Height = 25
Top = 197 Top = 197
Width = 29 Width = 29
@ -164,23 +162,23 @@ object fmRegistrySettings: TfmRegistrySettings
end end
object Label3: TLabel object Label3: TLabel
Left = 7 Left = 7
Height = 20 Height = 16
Top = 199 Top = 199
Width = 167 Width = 147
Caption = 'Select specified directory' Caption = 'Select specified directory'
end end
object lblBackupFileExt: TLabel object lblBackupFileExt: TLabel
Left = 306 Left = 306
Height = 20 Height = 16
Top = 20 Top = 20
Width = 140 Width = 125
Caption = 'Backup file extension' Caption = 'Backup file extension'
end end
object lblOutputFileExt: TLabel object lblOutputFileExt: TLabel
Left = 306 Left = 306
Height = 20 Height = 16
Top = 49 Top = 49
Width = 138 Width = 120
Caption = 'Output file extension' Caption = 'Output file extension'
end end
object rgLogLevel: TRadioGroup object rgLogLevel: TRadioGroup
@ -197,8 +195,8 @@ object fmRegistrySettings: TfmRegistrySettings
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 65 ClientHeight = 73
ClientWidth = 277 ClientWidth = 279
Items.Strings = ( Items.Strings = (
'Errors only' 'Errors only'
'File' 'File'
@ -221,8 +219,8 @@ object fmRegistrySettings: TfmRegistrySettings
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 72 ClientHeight = 80
ClientWidth = 742 ClientWidth = 744
Items.Strings = ( Items.Strings = (
'Temp' 'Temp'
'Application' 'Application'
@ -233,26 +231,27 @@ object fmRegistrySettings: TfmRegistrySettings
end end
object btnViewLog: TButton object btnViewLog: TButton
Left = 392 Left = 392
Height = 25 Height = 32
Top = 255 Top = 255
Width = 110 Width = 98
AutoSize = True
Caption = 'View Log now' Caption = 'View Log now'
TabOrder = 6 TabOrder = 6
OnClick = btnViewLogClick OnClick = btnViewLogClick
end end
object cbViewLog: TCheckBox object cbViewLog: TCheckBox
Left = 7 Left = 7
Height = 24 Height = 23
Top = 231 Top = 231
Width = 174 Width = 160
Caption = 'View log after each run' Caption = 'View log after each run'
TabOrder = 4 TabOrder = 4
end end
object edtBackupExt: TEdit object edtBackupExt: TEdit
AnchorSideLeft.Control = lblBackupFileExt AnchorSideLeft.Control = lblBackupFileExt
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
Left = 452 Left = 437
Height = 28 Height = 33
Top = 15 Top = 15
Width = 55 Width = 55
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -262,8 +261,8 @@ object fmRegistrySettings: TfmRegistrySettings
object edtOutputExt: TEdit object edtOutputExt: TEdit
AnchorSideLeft.Control = lblOutputFileExt AnchorSideLeft.Control = lblOutputFileExt
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
Left = 450 Left = 432
Height = 28 Height = 33
Top = 49 Top = 49
Width = 55 Width = 55
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -272,31 +271,31 @@ object fmRegistrySettings: TfmRegistrySettings
end end
object cbLogTime: TCheckBox object cbLogTime: TCheckBox
Left = 7 Left = 7
Height = 24 Height = 23
Top = 256 Top = 256
Width = 192 Width = 177
Caption = 'Log time taken to process' Caption = 'Log time taken to process'
TabOrder = 5 TabOrder = 5
end end
end end
object tsExclusions: TTabSheet object tsExclusions: TTabSheet
Caption = '&Exclusions' Caption = '&Exclusions'
ClientHeight = 310 ClientHeight = 305
ClientWidth = 763 ClientWidth = 761
ImageIndex = 2 ImageIndex = 2
OnResize = tsExclusionsResize OnResize = tsExclusionsResize
object lblFilesCaption: TLabel object lblFilesCaption: TLabel
Left = 11 Left = 11
Height = 20 Height = 16
Top = 5 Top = 5
Width = 324 Width = 284
Caption = 'Individual files to exclude from batch processing:' Caption = 'Individual files to exclude from batch processing:'
end end
object lblDirsCaption: TLabel object lblDirsCaption: TLabel
Left = 11 Left = 11
Height = 20 Height = 16
Top = 148 Top = 148
Width = 300 Width = 264
Caption = 'Directories to exclude from batch processing:' Caption = 'Directories to exclude from batch processing:'
end end
object mFiles: TMemo object mFiles: TMemo
@ -316,32 +315,32 @@ object fmRegistrySettings: TfmRegistrySettings
end end
object tsIde: TTabSheet object tsIde: TTabSheet
Caption = 'IDE' Caption = 'IDE'
ClientHeight = 310 ClientHeight = 305
ClientWidth = 763 ClientWidth = 761
ImageIndex = 3 ImageIndex = 3
TabVisible = False TabVisible = False
object cbEditorIntegration: TCheckBox object cbEditorIntegration: TCheckBox
Left = 11 Left = 11
Height = 24 Height = 23
Top = 15 Top = 15
Width = 138 Width = 125
Caption = '&Editor Integration' Caption = '&Editor Integration'
TabOrder = 0 TabOrder = 0
end end
object cbFormatBeforeSave: TCheckBox object cbFormatBeforeSave: TCheckBox
Left = 11 Left = 11
Height = 24 Height = 23
Top = 59 Top = 59
Width = 151 Width = 141
Caption = 'Format before &Save' Caption = 'Format before &Save'
TabOrder = 1 TabOrder = 1
OnClick = cbFormatBeforeSaveClick OnClick = cbFormatBeforeSaveClick
end end
object cbFormatAfterLoad: TCheckBox object cbFormatAfterLoad: TCheckBox
Left = 11 Left = 11
Height = 24 Height = 23
Top = 37 Top = 37
Width = 140 Width = 129
Caption = 'Format after &Load' Caption = 'Format after &Load'
TabOrder = 2 TabOrder = 2
OnClick = cbFormatAfterLoadClick OnClick = cbFormatAfterLoadClick
@ -350,8 +349,8 @@ object fmRegistrySettings: TfmRegistrySettings
end end
object ButtonPanel: TButtonPanel object ButtonPanel: TButtonPanel
Left = 8 Left = 8
Height = 30 Height = 38
Top = 351 Top = 343
Width = 755 Width = 755
BorderSpacing.Around = 8 BorderSpacing.Around = 8
OKButton.Name = 'OKButton' OKButton.Name = 'OKButton'

View File

@ -247,9 +247,6 @@ begin
rgLogLevel.Items[1] := lisCnfLogFile; rgLogLevel.Items[1] := lisCnfLogFile;
rgLogLevel.Items[2] := lisCnfLogToken; rgLogLevel.Items[2] := lisCnfLogToken;
rgLogDir.Caption := lisCnfLogFileDir; rgLogDir.Caption := lisCnfLogFileDir;
rgLogDir.Items[0] := lisCnfLogTemp;
rgLogDir.Items[1] := lisCnfLogApplication;
rgLogDir.Items[2] := lisCnfLogSpecified;
Label3.Caption := lisCnfLogSelectDir; Label3.Caption := lisCnfLogSelectDir;
cbViewLog.Caption := lisCnfLogViewLog; cbViewLog.Caption := lisCnfLogViewLog;
@ -312,10 +309,10 @@ end;
procedure TfmRegistrySettings.ShowDirs; procedure TfmRegistrySettings.ShowDirs;
begin begin
rgLogDir.Items[0] := 'Temp: ' + GetTempDir; rgLogDir.Items[0] := Format(lisCnfLogTemp, [GetTempDir]);
rgLogDir.Items[1] := 'Application: ' + IncludeTrailingPathDelimiter( rgLogDir.Items[1] := Format(lisCnfLogApplication, [IncludeTrailingPathDelimiter(
ExtractFileDir(ParamStr(0))); ExtractFileDir(ParamStr(0)))]);
rgLogDir.Items[2] := 'Specified: ' + fsSpecifiedDirectory; rgLogDir.Items[2] := Format(lisCnfLogSpecified, [fsSpecifiedDirectory]);
end; end;
procedure TfmRegistrySettings.tsExclusionsResize(Sender: TObject); procedure TfmRegistrySettings.tsExclusionsResize(Sender: TObject);