IDE: improved Compilation Options page taborder/layout and i18n, patch from Alexey Torgashin, bug #28295

git-svn-id: trunk@49353 -
This commit is contained in:
maxim 2015-06-16 23:24:13 +00:00
parent dc5207067c
commit 1217703f4c
3 changed files with 133 additions and 129 deletions

View File

@ -12,9 +12,9 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
Left = 0
Height = 18
Height = 19
Top = 0
Width = 136
Width = 118
Caption = 'chkCreateMakefile'
ParentShowHint = False
ShowHint = True
@ -27,23 +27,23 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 103
Top = 218
Height = 105
Top = 222
Width = 741
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'ExecuteAfterGroupBox'
ClientHeight = 81
ClientWidth = 733
ClientHeight = 85
ClientWidth = 737
TabOrder = 3
object lblRunIfExecAfter: TLabel
AnchorSideLeft.Control = ExecuteAfterGroupBox
AnchorSideTop.Control = ExecuteAfterGroupBox
Left = 6
Height = 16
Height = 15
Top = 6
Width = 109
Width = 90
BorderSpacing.Around = 6
Caption = 'lblRunIfExecAfter'
ParentColor = False
@ -53,9 +53,9 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Control = ExecuteAfterCommandComboBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 32
Width = 178
Height = 15
Top = 35
Width = 151
BorderSpacing.Around = 6
Caption = 'ExecuteAfterCommandLabel'
ParentColor = False
@ -64,10 +64,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = lblRunIfExecAfter
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterGroupBox
Left = 145
Height = 18
Left = 126
Height = 19
Top = 6
Width = 154
Width = 133
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecAfterCompile'
@ -77,10 +77,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkExecAfterCompile
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterGroupBox
Left = 329
Height = 18
Left = 289
Height = 19
Top = 6
Width = 133
Width = 115
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecAfterBuild'
@ -90,10 +90,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkExecAfterBuild
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterGroupBox
Left = 492
Height = 18
Left = 434
Height = 19
Top = 6
Width = 126
Width = 109
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecAfterRun'
@ -104,50 +104,50 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterScanMakeCheckBox
AnchorSideTop.Side = asrCenter
Left = 407
Height = 18
Top = 57
Width = 213
Left = 353
Height = 19
Top = 60
Width = 184
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'ExecuteAfterScanFPCCheckBox'
TabOrder = 4
TabOrder = 6
end
object ExecuteAfterScanMakeCheckBox: TCheckBox
AnchorSideLeft.Control = ExecuteAfterScanLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterCommandComboBox
AnchorSideTop.Side = asrBottom
Left = 154
Height = 18
Top = 57
Width = 223
Left = 131
Height = 19
Top = 60
Width = 192
BorderSpacing.Around = 6
Caption = 'ExecuteAfterScanMakeCheckBox'
TabOrder = 3
TabOrder = 5
end
object ExecuteAfterShowAllCheckBox: TCheckBox
AnchorSideLeft.Control = ExecuteAfterScanFPCCheckBox
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterScanMakeCheckBox
AnchorSideTop.Side = asrCenter
Left = 650
Height = 18
Top = 57
Width = 211
Left = 567
Height = 19
Top = 60
Width = 181
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'ExecuteAfterShowAllCheckBox'
TabOrder = 5
TabOrder = 7
end
object ExecuteAfterScanLabel: TLabel
AnchorSideLeft.Control = ExecuteAfterGroupBox
AnchorSideTop.Control = ExecuteAfterScanMakeCheckBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 58
Width = 142
Height = 15
Top = 62
Width = 119
BorderSpacing.Left = 6
Caption = 'ExecuteAfterScanLabel'
ParentColor = False
@ -158,16 +158,16 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Control = chkExecAfterCompile
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ExecAfterBrowseButton
Left = 196
Height = 21
Top = 30
Width = 461
Left = 169
Height = 23
Top = 31
Width = 527
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12
BorderSpacing.Top = 6
BorderSpacing.Bottom = 6
ItemHeight = 0
TabOrder = 6
ItemHeight = 15
TabOrder = 3
Text = 'ExecuteAfterCommandComboBox'
end
object ExecAfterBrowseButton: TButton
@ -176,16 +176,16 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ExecuteAfterCommandComboBox
AnchorSideBottom.Side = asrBottom
Left = 657
Height = 20
Top = 30
Width = 70
Anchors = [akTop, akRight]
Left = 696
Height = 23
Top = 31
Width = 35
Anchors = [akTop, akRight, akBottom]
AutoSize = True
BorderSpacing.Right = 6
Caption = '...'
OnClick = CompCmdBrowseButtonClick
TabOrder = 7
TabOrder = 4
end
end
object grpCompiler: TGroupBox
@ -195,23 +195,23 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 79
Top = 133
Height = 80
Top = 136
Width = 741
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'grpCompiler'
ClientHeight = 57
ClientWidth = 733
ClientHeight = 60
ClientWidth = 737
TabOrder = 2
object lblRunIfCompiler: TLabel
AnchorSideLeft.Control = grpCompiler
AnchorSideTop.Control = grpCompiler
Left = 6
Height = 16
Height = 15
Top = 6
Width = 106
Width = 90
BorderSpacing.Around = 6
Caption = 'lblRunIfCompiler'
ParentColor = False
@ -221,9 +221,9 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Control = cobCompiler
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 32
Width = 73
Height = 15
Top = 35
Width = 62
BorderSpacing.Around = 6
Caption = 'lblCompiler'
ParentColor = False
@ -232,10 +232,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = lblRunIfCompiler
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpCompiler
Left = 142
Height = 18
Left = 126
Height = 19
Top = 6
Width = 152
Width = 133
BorderSpacing.Left = 30
BorderSpacing.Top = 6
Caption = 'chkCompilerCompile'
@ -245,10 +245,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkCompilerCompile
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpCompiler
Left = 324
Height = 18
Left = 289
Height = 19
Top = 6
Width = 131
Width = 115
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkCompilerBuild'
@ -258,10 +258,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkCompilerBuild
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpCompiler
Left = 485
Height = 18
Left = 434
Height = 19
Top = 6
Width = 124
Width = 109
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkCompilerRun'
@ -273,15 +273,15 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Control = chkCompilerCompile
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BrowseCompilerButton
Left = 91
Height = 21
Top = 30
Width = 566
Left = 80
Height = 23
Top = 31
Width = 616
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12
BorderSpacing.Top = 6
BorderSpacing.Bottom = 6
ItemHeight = 0
ItemHeight = 15
TabOrder = 3
Text = 'cobCompiler'
end
@ -291,10 +291,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = cobCompiler
AnchorSideBottom.Side = asrBottom
Left = 657
Height = 21
Top = 30
Width = 70
Left = 696
Height = 23
Top = 31
Width = 35
Anchors = [akTop, akRight, akBottom]
AutoSize = True
BorderSpacing.Right = 6
@ -312,23 +312,23 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 103
Top = 24
Height = 105
Top = 25
Width = 741
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'ExecuteBeforeGroupBox'
ClientHeight = 81
ClientWidth = 733
ClientHeight = 85
ClientWidth = 737
TabOrder = 1
object lblRunIfExecBefore: TLabel
AnchorSideLeft.Control = ExecuteBeforeGroupBox
AnchorSideTop.Control = ExecuteBeforeGroupBox
Left = 6
Height = 16
Height = 15
Top = 6
Width = 118
Width = 98
BorderSpacing.Around = 6
Caption = 'lblRunIfExecBefore'
ParentColor = False
@ -338,9 +338,9 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Control = ExecuteBeforeCommandComboBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 32
Width = 187
Height = 15
Top = 35
Width = 159
BorderSpacing.Around = 6
Caption = 'ExecuteBeforeCommandLabel'
ParentColor = False
@ -349,10 +349,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = lblRunIfExecBefore
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeGroupBox
Left = 154
Height = 18
Left = 134
Height = 19
Top = 6
Width = 163
Width = 141
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecBeforeCompile'
@ -362,10 +362,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkExecBeforeCompile
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeGroupBox
Left = 347
Height = 18
Left = 305
Height = 19
Top = 6
Width = 142
Width = 123
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecBeforeBuild'
@ -375,10 +375,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkExecBeforeBuild
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeGroupBox
Left = 519
Height = 18
Left = 458
Height = 19
Top = 6
Width = 135
Width = 117
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecBeforeRun'
@ -389,50 +389,50 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeScanMakeCheckBox
AnchorSideTop.Side = asrCenter
Left = 425
Height = 18
Top = 57
Width = 222
Left = 369
Height = 19
Top = 60
Width = 192
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'ExecuteBeforeScanFPCCheckBox'
TabOrder = 4
TabOrder = 6
end
object ExecuteBeforeScanMakeCheckBox: TCheckBox
AnchorSideLeft.Control = ExecuteBeforeScanLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeCommandComboBox
AnchorSideTop.Side = asrBottom
Left = 163
Height = 18
Top = 57
Width = 232
Left = 139
Height = 19
Top = 60
Width = 200
BorderSpacing.Around = 6
Caption = 'ExecuteBeforeScanMakeCheckBox'
TabOrder = 3
TabOrder = 5
end
object ExecuteBeforeShowAllCheckBox: TCheckBox
AnchorSideLeft.Control = ExecuteBeforeScanFPCCheckBox
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeScanMakeCheckBox
AnchorSideTop.Side = asrCenter
Left = 677
Height = 18
Top = 57
Width = 220
Left = 591
Height = 19
Top = 60
Width = 189
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'ExecuteBeforeShowAllCheckBox'
TabOrder = 5
TabOrder = 7
end
object ExecuteBeforeScanLabel: TLabel
AnchorSideLeft.Control = ExecuteBeforeGroupBox
AnchorSideTop.Control = ExecuteBeforeScanMakeCheckBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 58
Width = 151
Height = 15
Top = 62
Width = 127
BorderSpacing.Left = 6
Caption = 'ExecuteBeforeScanLabel'
ParentColor = False
@ -443,16 +443,16 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Control = chkExecBeforeCompile
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ExecBeforeBrowseButton
Left = 205
Height = 21
Top = 30
Width = 452
Left = 177
Height = 23
Top = 31
Width = 519
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12
BorderSpacing.Top = 6
BorderSpacing.Bottom = 6
ItemHeight = 0
TabOrder = 6
ItemHeight = 15
TabOrder = 3
Text = 'ExecuteBeforeCommandComboBox'
end
object ExecBeforeBrowseButton: TButton
@ -462,16 +462,16 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ExecuteBeforeCommandComboBox
AnchorSideBottom.Side = asrBottom
Left = 657
Height = 21
Top = 30
Width = 70
Left = 696
Height = 23
Top = 31
Width = 35
Anchors = [akTop, akRight, akBottom]
AutoSize = True
BorderSpacing.Right = 6
Caption = '...'
OnClick = CompCmdBrowseButtonClick
TabOrder = 7
TabOrder = 4
end
end
end

View File

@ -6,7 +6,7 @@ interface
uses
Classes, sysutils,
Controls, StdCtrls, Dialogs,
Controls, StdCtrls, Dialogs, FileUtil,
FileProcs, DefineTemplates, CodeToolManager,
IDEOptionsIntf, CompOptsIntf, IDEDialogs, IDEUtils,
Project, CompilerOptions, PackageDefs, LazarusIDEStrConsts, EnvironmentOpts,
@ -82,6 +82,7 @@ begin
try
InputHistories.ApplyFileDialogSettings(OpenDialog);
OpenDialog.Options:=OpenDialog.Options+[ofFileMustExist];
OpenDialog.Filter:=dlgFilterAll+'|'+GetAllFilesMask;
OldFilename:='';
OldParams:='';
// set title
@ -90,11 +91,11 @@ begin
OpenDialog.Title:=Format(lisChooseCompilerExecutable,[GetDefaultCompilerFilename])
end else if (Sender=ExecAfterBrowseButton) then begin
Combo:=ExecuteAfterCommandComboBox;
OpenDialog.Title:='Choose an executable';
OpenDialog.Title:=lisChooseExecutable;
SplitCmdLine(Combo.Text,OldFilename,OldParams);
end else if (Sender=ExecBeforeBrowseButton) then begin
Combo:=ExecuteBeforeCommandComboBox;
OpenDialog.Title:='Choose an executable';
OpenDialog.Title:=lisChooseExecutable;
SplitCmdLine(Combo.Text,OldFilename,OldParams);
end else
exit;
@ -116,14 +117,14 @@ begin
end;
end else begin
// maybe a script
if not CheckExecutable(OldFilename,NewFilename,'Invalid Executable','The file "%s" is not executable.')
if not CheckExecutable(OldFilename,NewFilename,lisInvalidExecutable,lisInvalidExecutableMessageText)
then
exit;
end;
end else if (Sender=ExecBeforeBrowseButton)
or (Sender=ExecAfterBrowseButton) then begin
// check executable
if not CheckExecutable(OldFilename,NewFilename,'Invalid Executable','The file "%s" is not executable.')
if not CheckExecutable(OldFilename,NewFilename,lisInvalidExecutable,lisInvalidExecutableMessageText)
then
exit;
end;

View File

@ -745,6 +745,8 @@ resourcestring
lisTheDirectoryContainsNoProjectUnitsAnyMoreRemoveThi = 'The directory "%s" '
+'contains no project units any more. Remove this directory from the '
+'project''s unit search path?';
lisInvalidExecutable = 'Invalid Executable';
lisInvalidExecutableMessageText = 'The file "%s" is not executable.';
lisInvalidProjectFilename = 'Invalid project filename';
lisisAnInvalidProjectNamePleaseChooseAnotherEGProject = '"%s" is an '
+'invalid project name.%sPlease choose another (e.g. project1.lpi)';
@ -991,6 +993,7 @@ resourcestring
lisChooseMakeExecutable = 'Choose "make" executable';
lisChooseDebuggerExecutable = 'Choose debugger executable';
lisChooseTestBuildDir = 'Choose the directory for tests';
lisChooseExecutable = 'Choose an executable';
// dialogs
lisProjectChanged = 'Project changed';