IDE: Chances in IdeOptionsDlg, preparing for more changes

git-svn-id: trunk@38583 -
This commit is contained in:
juha 2012-09-08 16:28:13 +00:00
parent 400dc6d8e4
commit 8b83271efa
6 changed files with 208 additions and 100 deletions

View File

@ -1,94 +1,96 @@
inherited CompilerPathOptionsFrame: TCompilerPathOptionsFrame
object CompilerPathOptionsFrame: TCompilerPathOptionsFrame
Left = 0
Height = 432
Top = 0
Width = 509
ClientHeight = 432
ClientWidth = 509
TabOrder = 0
DesignLeft = 346
DesignTop = 328
object OtherUnitsLabel: TLabel[0]
DesignTop = 106
object OtherUnitsLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 18
Height = 15
Top = 0
Width = 106
Width = 92
Caption = 'OtherUnitsLabel'
ParentColor = False
end
object IncludeFilesLabel: TLabel[1]
object IncludeFilesLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = OtherUnitsEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 0
Height = 18
Top = 51
Width = 113
Height = 15
Top = 44
Width = 95
BorderSpacing.Top = 6
Caption = 'IncludeFilesLabel'
ParentColor = False
end
object OtherSourcesLabel: TLabel[2]
object OtherSourcesLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = ProjTargetApplyConventionsCheckBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 0
Height = 18
Top = 277
Width = 123
Height = 15
Top = 241
Width = 106
Caption = 'OtherSourcesLabel'
ParentColor = False
end
object LibrariesLabel: TLabel[3]
object LibrariesLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = IncludeFilesEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 0
Height = 18
Top = 102
Width = 92
Height = 15
Top = 88
Width = 78
BorderSpacing.Top = 6
Caption = 'LibrariesLabel'
ParentColor = False
end
object UnitOutputDirLabel: TLabel[4]
object UnitOutputDirLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = LibrariesEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 0
Height = 18
Top = 153
Width = 126
Height = 15
Top = 132
Width = 110
BorderSpacing.Top = 6
Caption = 'UnitOutputDirLabel'
ParentColor = False
end
object DebugPathLabel: TLabel[5]
object DebugPathLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = OtherSourcesEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 0
Height = 18
Top = 328
Width = 106
Height = 15
Top = 285
Width = 92
BorderSpacing.Top = 6
Caption = 'DebugPathLabel'
ParentColor = False
end
object LCLWidgetTypeLabel: TLabel[6]
object LCLWidgetTypeLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = DebugPathEdit
AnchorSideTop.Side = asrBottom
Left = 0
Height = 18
Top = 379
Width = 134
Height = 15
Top = 329
Width = 115
Caption = 'LCLWidgetTypeLabel'
Font.Color = clBlue
ParentColor = False
@ -97,131 +99,131 @@ inherited CompilerPathOptionsFrame: TCompilerPathOptionsFrame
OnMouseEnter = LCLWidgetTypeLabelMouseEnter
OnMouseLeave = LCLWidgetTypeLabelMouseLeave
end
object OtherUnitsEdit: TEdit[7]
object OtherUnitsEdit: TEdit
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = OtherUnitsLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 27
Top = 18
Height = 23
Top = 15
Width = 509
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Bottom = 6
TabOrder = 0
Text = 'OtherUnitsEdit'
end
object IncludeFilesEdit: TEdit[8]
object IncludeFilesEdit: TEdit
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = IncludeFilesLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 27
Top = 69
Height = 23
Top = 59
Width = 509
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Bottom = 6
TabOrder = 1
Text = 'IncludeFilesEdit'
end
object OtherSourcesEdit: TEdit[9]
object OtherSourcesEdit: TEdit
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = OtherSourcesLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 27
Top = 295
Height = 23
Top = 256
Width = 509
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Bottom = 6
TabOrder = 6
Text = 'OtherSourcesEdit'
end
object LibrariesEdit: TEdit[10]
object LibrariesEdit: TEdit
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = LibrariesLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 27
Top = 120
Height = 23
Top = 103
Width = 509
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Bottom = 6
TabOrder = 2
Text = 'LibrariesEdit'
end
object UnitOutputDirEdit: TEdit[11]
object UnitOutputDirEdit: TEdit
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = UnitOutputDirLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 27
Top = 171
Height = 23
Top = 147
Width = 509
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Bottom = 6
TabOrder = 3
Text = 'UnitOutputDirEdit'
end
object DebugPathEdit: TEdit[12]
object DebugPathEdit: TEdit
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = DebugPathLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 27
Top = 346
Height = 23
Top = 300
Width = 509
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Bottom = 6
TabOrder = 7
Text = 'DebugPathEdit'
end
object ProjTargetFileLabel: TLabel[13]
object ProjTargetFileLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = UnitOutputDirEdit
AnchorSideTop.Side = asrBottom
Left = 0
Height = 18
Top = 204
Width = 124
Height = 15
Top = 176
Width = 108
Caption = 'ProjTargetFileLabel'
ParentColor = False
end
object ProjTargetFileEdit: TEdit[14]
object ProjTargetFileEdit: TEdit
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = ProjTargetFileLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 27
Top = 222
Height = 23
Top = 191
Width = 509
Anchors = [akTop, akLeft, akRight]
OnChange = ProjTargetFileEditChange
TabOrder = 4
Text = 'ProjTargetFileEdit'
end
object ProjTargetApplyConventionsCheckBox: TCheckBox[15]
object ProjTargetApplyConventionsCheckBox: TCheckBox
AnchorSideLeft.Control = ProjTargetFileEdit
AnchorSideTop.Control = ProjTargetFileEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 0
Height = 22
Top = 249
Width = 272
Height = 21
Top = 214
Width = 237
BorderSpacing.Bottom = 6
Caption = 'ProjTargetApplyConventionsCheckBox'
TabOrder = 5

View File

@ -736,7 +736,7 @@ begin
btnLoadSave.LoadGlyphFromLazarusResource('laz_save');
chkUseAsDefault := TCheckBox(ADialog.AddControl(TCheckBox));
chkUseAsDefault.Caption := dlgCOUseAsDefault;
chkUseAsDefault.Caption := dlgCOSetAsDefault;
chkUseAsDefault.ShowHint := True;
chkUseAsDefault.Hint := lisWhenEnabledTheCurrentOptionsAreSavedToTheTemplateW;
end;

View File

@ -1,15 +1,15 @@
inherited IDEOptionsDialog: TIDEOptionsDialog
Left = 318
Height = 500
Top = 182
Width = 700
Left = 121
Height = 404
Top = 96
Width = 675
ActiveControl = FilterEdit
BorderIcons = [biSystemMenu]
Caption = 'IDEOptionsDialog'
ClientHeight = 500
ClientWidth = 700
Constraints.MinHeight = 500
Constraints.MinWidth = 700
ClientHeight = 404
ClientWidth = 675
Constraints.MinHeight = 350
Constraints.MinWidth = 500
OnShow = FormShow
Position = poScreenCenter
object ButtonPanel: TButtonPanel[0]
@ -19,8 +19,8 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
AnchorSideBottom.Control = Owner
Left = 6
Height = 34
Top = 460
Width = 688
Top = 364
Width = 663
BorderSpacing.Left = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
@ -38,38 +38,36 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
ShowButtons = [pbOK, pbCancel, pbHelp]
end
object CatTVSplitter: TSplitter[1]
Left = 234
Height = 460
Left = 255
Height = 364
Top = 0
Width = 5
Width = 4
end
object Panel1: TPanel[2]
object CategoryPanel: TPanel[2]
Left = 0
Height = 460
Height = 364
Top = 0
Width = 234
Width = 255
Align = alLeft
BevelOuter = bvNone
ClientHeight = 460
ClientWidth = 234
ClientHeight = 364
ClientWidth = 255
Constraints.MinWidth = 150
TabOrder = 2
object CategoryTree: TTreeView
AnchorSideLeft.Control = FilterEdit
AnchorSideTop.Control = FilterEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Control = CategoryPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Panel1
AnchorSideBottom.Side = asrBottom
AnchorSideBottom.Control = SettingsPanel
Left = 6
Height = 417
Top = 37
Width = 222
Height = 308
Top = 36
Width = 249
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
BorderSpacing.Top = 5
DefaultItemHeight = 18
ReadOnly = True
TabOrder = 0
OnChange = CategoryTreeChange
@ -79,23 +77,114 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
end
object FilterEdit: TTreeFilterEdit
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Control = CategoryPanel
AnchorSideRight.Side = asrBottom
Left = 6
Height = 23
Top = 8
Width = 179
Width = 200
OnFilterItem = FilterEditFilterItem
UseFormActivate = True
ButtonWidth = 23
NumGlyphs = 0
NumGlyphs = 1
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
Font.Color = clBtnShadow
MaxLength = 0
ParentFont = False
TabOrder = 1
FilteredTreeview = CategoryTree
end
object SettingsPanel: TPanel
Left = 0
Height = 20
Top = 344
Width = 255
Align = alBottom
AutoSize = True
Constraints.MinHeight = 20
TabOrder = 2
end
end
object BuildModeSelectPanel: TPanel[3]
AnchorSideLeft.Control = CatTVSplitter
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = EditorsPanel
AnchorSideRight.Side = asrBottom
Left = 259
Height = 40
Top = 0
Width = 413
Anchors = [akTop, akLeft, akRight]
ClientHeight = 40
ClientWidth = 413
TabOrder = 3
Visible = False
object BuildModeLabel: TLabel
Left = 12
Height = 15
Top = 13
Width = 63
Caption = 'Build Mode'
ParentColor = False
end
object BuildModeComboBox: TComboBox
AnchorSideLeft.Control = BuildModeLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = BuildModeLabel
AnchorSideTop.Side = asrCenter
Left = 82
Height = 23
Top = 9
Width = 154
BorderSpacing.Left = 7
ItemHeight = 0
Items.Strings = (
'<All build modes>'
'Juha''s test mode'
'Another test mode'
)
TabOrder = 0
end
object BuildModeManageButton: TButton
AnchorSideLeft.Control = BuildModeComboBox
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = BuildModeComboBox
AnchorSideTop.Side = asrCenter
Left = 243
Height = 25
Top = 8
Width = 27
BorderSpacing.Left = 7
Caption = '...'
OnClick = BuildModeManageButtonClick
TabOrder = 1
end
object Label1: TLabel
Left = 286
Height = 15
Top = 13
Width = 118
Caption = 'Under construction ...'
Color = clFuchsia
ParentColor = False
Transparent = False
end
end
object EditorsPanel: TScrollBox[4]
AnchorSideLeft.Control = CatTVSplitter
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = BuildModeSelectPanel
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = ButtonPanel
Left = 259
Height = 324
Top = 40
Width = 413
HorzScrollBar.Page = 407
HorzScrollBar.Tracking = True
VertScrollBar.Page = 318
VertScrollBar.Tracking = True
Anchors = [akTop, akLeft, akRight, akBottom]
TabOrder = 4
end
end

View File

@ -34,7 +34,7 @@ uses
Buttons, ButtonPanel, ExtCtrls,
IDEWindowIntf, IDEOptionsIntf, IDECommands, IDEHelpIntf,
EnvironmentOpts, LazarusIDEStrConsts,
EditorOptions, TreeFilterEdit, EditBtn;
EditorOptions, TreeFilterEdit, EditBtn, StdCtrls;
type
TIDEOptsDlgAction = (
@ -48,11 +48,19 @@ type
{ TIDEOptionsDialog }
TIDEOptionsDialog = class(TAbstractOptionsEditorDialog)
BuildModeComboBox: TComboBox;
BuildModeManageButton: TButton;
BuildModeLabel: TLabel;
ButtonPanel: TButtonPanel;
CategoryTree: TTreeView;
CatTVSplitter: TSplitter;
Panel1: TPanel;
CategoryPanel: TPanel;
EditorsPanel: TScrollBox;
FilterEdit: TTreeFilterEdit;
BuildModeSelectPanel: TPanel;
Label1: TLabel;
SettingsPanel: TPanel;
procedure BuildModeManageButtonClick(Sender: TObject);
procedure CategoryTreeChange(Sender: TObject; Node: TTreeNode);
procedure CategoryTreeCollapsed(Sender: TObject; Node: TTreeNode);
procedure CategoryTreeExpanded(Sender: TObject; Node: TTreeNode);
@ -117,6 +125,7 @@ begin
PrevEditor := nil;
FEditorsCreated := False;
FEditorToOpen := nil;
SettingsPanel.Constraints.MinHeight:=0;
IDEDialogLayoutList.ApplyLayout(Self, Width, Height);
Caption := dlgIDEOptions;
@ -175,16 +184,21 @@ begin
NewLastSelected := AEditor.Rec;
if (AEditor <> PrevEditor) then begin
if Assigned(PrevEditor) then
PrevEditor.Visible := False; //PrevEditor.Parent := nil;
PrevEditor.Visible := False;
if Assigned(AEditor) then begin
AEditor.Align := alClient;
AEditor.BorderSpacing.Around := 6; //AEditor.Parent := Self;
AEditor.BorderSpacing.Around := 6;
AEditor.Visible := True;
end;
PrevEditor := AEditor;
end;
end;
procedure TIDEOptionsDialog.BuildModeManageButtonClick(Sender: TObject);
begin
;
end;
procedure TIDEOptionsDialog.CategoryTreeCollapsed(Sender: TObject; Node: TTreeNode);
begin
if node.Deleting then exit;
@ -262,8 +276,9 @@ var
begin
if Node.Data <> nil then
with TAbstractIDEOptionsEditor(Node.Data) do
if ((ClassTypeForCompare = nil) and (SupportedOptionsClass = nil)) or
((SupportedOptionsClass <> nil) and ClassTypeForCompare.InheritsFrom(SupportedOptionsClass)) then
if ((ClassTypeForCompare = nil) and (SupportedOptionsClass = nil))
or ((SupportedOptionsClass <> nil)
and ClassTypeForCompare.InheritsFrom(SupportedOptionsClass)) then
begin
case anAction of
iodaRead: ReadSettings(AOptions);
@ -456,7 +471,7 @@ begin
Instance.Setup(Self);
Instance.Tag := Rec^.Items[j]^.Index;
Instance.Visible := False;
Instance.Parent := Self;
Instance.Parent := EditorsPanel;
instance.Rec := Rec^.Items[j];
if Rec^.Items[j]^.Parent = NoParent then
@ -580,8 +595,8 @@ end;
function TIDEOptionsDialog.AddControl(AControlClass: TControlClass): TControl;
begin
Result := AControlClass.Create(Self);
Result.Parent := Self;
Result.Align:=alBottom;
Result.Parent := SettingsPanel;
Result.Align := alBottom;
Result.BorderSpacing.Around := 6;
end;

View File

@ -376,6 +376,7 @@
<Filename Value="frames/buildmodeseditor.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="BuildModesEditorFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/>
<UnitName Value="BuildModesEditor"/>
</Unit45>

View File

@ -1867,7 +1867,7 @@ resourcestring
// compiler options
dlgCompilerOptions = 'Compiler Options';
dlgCOUseAsDefault = 'Use these compiler options as default for new projects';
dlgCOSetAsDefault = 'Set compiler options as default';
lisWhenEnabledTheCurrentOptionsAreSavedToTheTemplateW = 'When enabled the '
+'current options are saved to the template, which is used when creating '
+'new projects';
@ -5273,6 +5273,7 @@ resourcestring
dlgBuildModes = 'Build Modes';
dlgIdeMacroValues = 'IDE Macro Values';
lisBuildModes = 'Build modes';
lisManageBuildModes = 'Manage build modes';
lisInSession = 'In session';
lisThereMustBeAtLeastOneBuildMode = 'There must be at least one build mode.';
lisTheFirstBuildModeIsTheDefaultModeAndMustBeStoredIn = 'The first build '