mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 08:19:29 +02:00
IDE: Move Build Mode Management to its own form
git-svn-id: trunk@39272 -
This commit is contained in:
parent
ef65901375
commit
e4a4d8582a
@ -6,8 +6,8 @@ object BuildModesEditorFrame: TBuildModesEditorFrame
|
|||||||
ClientHeight = 421
|
ClientHeight = 421
|
||||||
ClientWidth = 550
|
ClientWidth = 550
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
DesignLeft = 460
|
DesignLeft = 337
|
||||||
DesignTop = 117
|
DesignTop = 116
|
||||||
object BuildModesGroupBox: TGroupBox
|
object BuildModesGroupBox: TGroupBox
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 250
|
Height = 250
|
||||||
@ -16,16 +16,16 @@ object BuildModesEditorFrame: TBuildModesEditorFrame
|
|||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'BuildModesGroupBox'
|
Caption = 'BuildModesGroupBox'
|
||||||
ClientHeight = 230
|
ClientHeight = 233
|
||||||
ClientWidth = 532
|
ClientWidth = 534
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object BuildModesStringGrid: TStringGrid
|
object BuildModesStringGrid: TStringGrid
|
||||||
AnchorSideTop.Control = BuildModeAddSpeedButton
|
AnchorSideTop.Control = BuildModeAddSpeedButton
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 208
|
Height = 211
|
||||||
Top = 22
|
Top = 22
|
||||||
Width = 532
|
Width = 534
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
AutoFillColumns = True
|
AutoFillColumns = True
|
||||||
@ -35,31 +35,30 @@ object BuildModesEditorFrame: TBuildModesEditorFrame
|
|||||||
ButtonStyle = cbsCheckboxColumn
|
ButtonStyle = cbsCheckboxColumn
|
||||||
MaxSize = 50
|
MaxSize = 50
|
||||||
Title.Caption = 'Active'
|
Title.Caption = 'Active'
|
||||||
Width = 175
|
Width = 176
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
ButtonStyle = cbsCheckboxColumn
|
ButtonStyle = cbsCheckboxColumn
|
||||||
MaxSize = 50
|
MaxSize = 50
|
||||||
Title.Caption = 'InSession'
|
Title.Caption = 'InSession'
|
||||||
Width = 175
|
Width = 176
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
MaxSize = 500
|
MaxSize = 500
|
||||||
SizePriority = 100
|
SizePriority = 100
|
||||||
Title.Caption = 'Title'
|
Title.Caption = 'Title'
|
||||||
Width = 176
|
Width = 178
|
||||||
end>
|
end>
|
||||||
FixedCols = 0
|
FixedCols = 0
|
||||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goSmoothScroll]
|
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goSmoothScroll]
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnCheckboxToggled = BuildModesStringGridCheckboxToggled
|
OnCheckboxToggled = BuildModesStringGridCheckboxToggled
|
||||||
OnSelection = BuildModesStringGridSelection
|
OnSelection = BuildModesStringGridSelection
|
||||||
OnSelectCell = BuildModesStringGridSelectCell
|
|
||||||
OnValidateEntry = BuildModesStringGridValidateEntry
|
OnValidateEntry = BuildModesStringGridValidateEntry
|
||||||
ColWidths = (
|
ColWidths = (
|
||||||
175
|
|
||||||
175
|
|
||||||
176
|
176
|
||||||
|
176
|
||||||
|
178
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
object BuildModeAddSpeedButton: TSpeedButton
|
object BuildModeAddSpeedButton: TSpeedButton
|
||||||
|
@ -58,8 +58,6 @@ type
|
|||||||
procedure BuildModeMoveUpSpeedButtonClick(Sender: TObject);
|
procedure BuildModeMoveUpSpeedButtonClick(Sender: TObject);
|
||||||
procedure BuildModesStringGridCheckboxToggled(sender: TObject; aCol,
|
procedure BuildModesStringGridCheckboxToggled(sender: TObject; aCol,
|
||||||
aRow: Integer; aState: TCheckboxState);
|
aRow: Integer; aState: TCheckboxState);
|
||||||
procedure BuildModesStringGridSelectCell(Sender: TObject; aCol,
|
|
||||||
aRow: Integer; var CanSelect: Boolean);
|
|
||||||
procedure BuildModesStringGridSelection(Sender: TObject; aCol, aRow: Integer);
|
procedure BuildModesStringGridSelection(Sender: TObject; aCol, aRow: Integer);
|
||||||
procedure BuildModesStringGridValidateEntry(sender: TObject; aCol,
|
procedure BuildModesStringGridValidateEntry(sender: TObject; aCol,
|
||||||
aRow: Integer; const OldValue: string; var NewValue: String);
|
aRow: Integer; const OldValue: string; var NewValue: String);
|
||||||
@ -71,7 +69,6 @@ type
|
|||||||
fModeActiveCol: integer;
|
fModeActiveCol: integer;
|
||||||
fModeInSessionCol: integer;
|
fModeInSessionCol: integer;
|
||||||
fModeNameCol: integer;
|
fModeNameCol: integer;
|
||||||
function GetAllBuildMacros: TStrings;
|
|
||||||
procedure UpdateInheritedOptions;
|
procedure UpdateInheritedOptions;
|
||||||
procedure FillBuildModesGrid;
|
procedure FillBuildModesGrid;
|
||||||
procedure UpdateBuildModeButtons;
|
procedure UpdateBuildModeButtons;
|
||||||
@ -261,21 +258,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildModesEditorFrame.BuildModesStringGridSelectCell(
|
|
||||||
Sender: TObject; aCol, aRow: Integer; var CanSelect: Boolean);
|
|
||||||
begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBuildModesEditorFrame.BuildModesStringGridSelection(Sender: TObject;
|
procedure TBuildModesEditorFrame.BuildModesStringGridSelection(Sender: TObject;
|
||||||
aCol, aRow: Integer);
|
aCol, aRow: Integer);
|
||||||
begin
|
begin
|
||||||
UpdateBuildModeButtons;
|
UpdateBuildModeButtons;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBuildModesEditorFrame.BuildModesStringGridValidateEntry(
|
procedure TBuildModesEditorFrame.BuildModesStringGridValidateEntry(sender: TObject;
|
||||||
sender: TObject; aCol, aRow: Integer; const OldValue: string;
|
aCol, aRow: Integer; const OldValue: string; var NewValue: String);
|
||||||
var NewValue: String);
|
|
||||||
var
|
var
|
||||||
CurMode: TProjectBuildMode;
|
CurMode: TProjectBuildMode;
|
||||||
s: string;
|
s: string;
|
||||||
@ -283,6 +273,7 @@ var
|
|||||||
b: Boolean;
|
b: Boolean;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
|
debugln(['TBuildModesForm.BuildModesStringGridValidateEntry Row=',aRow,' Col=',aCol]);
|
||||||
i:=aRow-1;
|
i:=aRow-1;
|
||||||
if (i<0) or (i>=AProject.BuildModes.Count) then exit;
|
if (i<0) or (i>=AProject.BuildModes.Count) then exit;
|
||||||
CurMode:=AProject.BuildModes[i];
|
CurMode:=AProject.BuildModes[i];
|
||||||
@ -305,7 +296,8 @@ begin
|
|||||||
// identifier
|
// identifier
|
||||||
s:=NewValue;
|
s:=NewValue;
|
||||||
for j:=1 to length(s) do
|
for j:=1 to length(s) do
|
||||||
if s[j]<' ' then s[j]:=' ';
|
if s[j]<' ' then
|
||||||
|
s[j]:=' ';
|
||||||
CurMode.Identifier:=s;
|
CurMode.Identifier:=s;
|
||||||
NewValue:=s;
|
NewValue:=s;
|
||||||
UpdateDialogCaption;
|
UpdateDialogCaption;
|
||||||
@ -375,48 +367,6 @@ begin
|
|||||||
Result:='TBuildModesEditorFrame.GetDialogCaption: no project';
|
Result:='TBuildModesEditorFrame.GetDialogCaption: no project';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBuildModesEditorFrame.GetAllBuildMacros: TStrings;
|
|
||||||
|
|
||||||
procedure Add(aBuildMacro: TLazBuildMacro);
|
|
||||||
begin
|
|
||||||
if GetAllBuildMacros.IndexOf(aBuildMacro.Identifier)>=0 then exit;
|
|
||||||
GetAllBuildMacros.AddObject(aBuildMacro.Identifier,aBuildMacro);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure Add(CompOpts: TLazCompilerOptions);
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
for i:=0 to CompOpts.BuildMacros.Count-1 do
|
|
||||||
Add(CompOpts.BuildMacros[i]);
|
|
||||||
end;
|
|
||||||
|
|
||||||
var
|
|
||||||
PkgList: TFPList;
|
|
||||||
APackage: TLazPackage;
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
Result:=TStringList.Create;
|
|
||||||
if AProject=nil then exit;
|
|
||||||
Add(AProject.CompilerOptions);
|
|
||||||
PkgList:=nil;
|
|
||||||
try
|
|
||||||
PackageGraph.GetAllRequiredPackages(AProject.FirstRequiredDependency,PkgList);
|
|
||||||
if PkgList<>nil then begin
|
|
||||||
for i:=0 to PkgList.Count-1 do begin
|
|
||||||
if TObject(PkgList[i]) is TLazPackage then begin
|
|
||||||
APackage:=TLazPackage(PkgList[i]);
|
|
||||||
Add(APackage.CompilerOptions);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
PkgList.Free;
|
|
||||||
end;
|
|
||||||
|
|
||||||
TStringList(Result).Sort;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TBuildModesEditorFrame.UpdateInheritedOptions;
|
procedure TBuildModesEditorFrame.UpdateInheritedOptions;
|
||||||
var
|
var
|
||||||
InhOptionCtrl: TCompilerInheritedOptionsFrame;
|
InhOptionCtrl: TCompilerInheritedOptionsFrame;
|
||||||
|
@ -42,7 +42,7 @@ object ProjectSaveOptionsFrame: TProjectSaveOptionsFrame
|
|||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 4
|
Height = 20
|
||||||
Top = 108
|
Top = 108
|
||||||
Width = 320
|
Width = 320
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
@ -58,6 +58,7 @@ object ProjectSaveOptionsFrame: TProjectSaveOptionsFrame
|
|||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 1
|
ChildSizing.ControlsPerLine = 1
|
||||||
|
Constraints.MinHeight = 20
|
||||||
OnClick = SaveSessionLocationRadioGroupClick
|
OnClick = SaveSessionLocationRadioGroupClick
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
|
@ -6,8 +6,11 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, ExtCtrls, Project, IDEOptionsIntf, ProjectIntf, LCLProc,
|
StdCtrls, ExtCtrls, Project, IDEOptionsIntf, ProjectIntf, LCLProc, IDEProcs,
|
||||||
LazarusIDEStrConsts, IDEProcs, BuildModesEditor;
|
{$IFnDEF NewBuildModeWindow}
|
||||||
|
BuildModesEditor,
|
||||||
|
{$ENDIF}
|
||||||
|
LazarusIDEStrConsts;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -22,9 +25,9 @@ type
|
|||||||
procedure SaveSessionLocationRadioGroupClick(Sender: TObject);
|
procedure SaveSessionLocationRadioGroupClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
fProject: TProject;
|
fProject: TProject;
|
||||||
function GetSessionLocation: TProjectSessionStorage;
|
|
||||||
public
|
public
|
||||||
function GetTitle: string; override;
|
function GetTitle: string; override;
|
||||||
|
function GetSessionLocation: TProjectSessionStorage;
|
||||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
||||||
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
|
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
|
||||||
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
|
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
|
||||||
@ -57,24 +60,26 @@ end;
|
|||||||
|
|
||||||
{ TProjectSaveOptionsFrame }
|
{ TProjectSaveOptionsFrame }
|
||||||
|
|
||||||
procedure TProjectSaveOptionsFrame.SaveSessionLocationRadioGroupClick(
|
procedure TProjectSaveOptionsFrame.SaveSessionLocationRadioGroupClick(Sender: TObject);
|
||||||
Sender: TObject);
|
{$IFnDEF NewBuildModeWindow}
|
||||||
var
|
var
|
||||||
BuildModesEditor: TBuildModesEditorFrame;
|
BuildModesEditor: TBuildModesEditorFrame;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
|
{$IFnDEF NewBuildModeWindow}
|
||||||
BuildModesEditor:=TBuildModesEditorFrame(FindOptionControl(TBuildModesEditorFrame));
|
BuildModesEditor:=TBuildModesEditorFrame(FindOptionControl(TBuildModesEditorFrame));
|
||||||
if BuildModesEditor<>nil then
|
if BuildModesEditor<>nil then
|
||||||
begin
|
begin
|
||||||
BuildModesEditor.LoadShowSessionFromProjects:=false;
|
BuildModesEditor.LoadShowSessionFromProjects:=false;
|
||||||
BuildModesEditor.ShowSession:=GetSessionLocation in [pssInIDEConfig,pssInProjectDir];
|
BuildModesEditor.ShowSession:=GetSessionLocation in [pssInIDEConfig,pssInProjectDir];
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TProjectSaveOptionsFrame.GetSessionLocation: TProjectSessionStorage;
|
function TProjectSaveOptionsFrame.GetSessionLocation: TProjectSessionStorage;
|
||||||
begin
|
begin
|
||||||
Result := LocalizedNameToProjectSessionStorage(
|
Result := LocalizedNameToProjectSessionStorage(
|
||||||
SaveSessionLocationRadioGroup.Items[
|
SaveSessionLocationRadioGroup.Items[SaveSessionLocationRadioGroup.ItemIndex]);
|
||||||
SaveSessionLocationRadioGroup.ItemIndex]);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TProjectSaveOptionsFrame.GetTitle: string;
|
function TProjectSaveOptionsFrame.GetTitle: string;
|
||||||
|
@ -18,8 +18,8 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = Owner
|
AnchorSideBottom.Control = Owner
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 41
|
Height = 38
|
||||||
Top = 357
|
Top = 360
|
||||||
Width = 663
|
Width = 663
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
@ -39,18 +39,18 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
end
|
end
|
||||||
object CatTVSplitter: TSplitter[1]
|
object CatTVSplitter: TSplitter[1]
|
||||||
Left = 255
|
Left = 255
|
||||||
Height = 357
|
Height = 360
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 4
|
Width = 4
|
||||||
end
|
end
|
||||||
object CategoryPanel: TPanel[2]
|
object CategoryPanel: TPanel[2]
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 357
|
Height = 360
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 255
|
Width = 255
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 357
|
ClientHeight = 360
|
||||||
ClientWidth = 255
|
ClientWidth = 255
|
||||||
Constraints.MinWidth = 150
|
Constraints.MinWidth = 150
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
@ -62,11 +62,12 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = SettingsPanel
|
AnchorSideBottom.Control = SettingsPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 299
|
Height = 304
|
||||||
Top = 38
|
Top = 36
|
||||||
Width = 249
|
Width = 249
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Top = 5
|
BorderSpacing.Top = 5
|
||||||
|
DefaultItemHeight = 18
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = CategoryTreeChange
|
OnChange = CategoryTreeChange
|
||||||
@ -79,7 +80,7 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideLeft.Control = CategoryPanel
|
AnchorSideLeft.Control = CategoryPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 23
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 200
|
Width = 200
|
||||||
OnFilterItem = FilterEditFilterItem
|
OnFilterItem = FilterEditFilterItem
|
||||||
@ -88,6 +89,7 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
|
Font.Color = clBtnShadow
|
||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -96,7 +98,7 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
object SettingsPanel: TPanel
|
object SettingsPanel: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 20
|
Height = 20
|
||||||
Top = 337
|
Top = 340
|
||||||
Width = 255
|
Width = 255
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -119,9 +121,9 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object BuildModeLabel: TLabel
|
object BuildModeLabel: TLabel
|
||||||
Left = 12
|
Left = 12
|
||||||
Height = 17
|
Height = 15
|
||||||
Top = 10
|
Top = 10
|
||||||
Width = 70
|
Width = 68
|
||||||
Caption = 'Build Mode'
|
Caption = 'Build Mode'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -130,9 +132,9 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = BuildModeLabel
|
AnchorSideTop.Control = BuildModeLabel
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 89
|
Left = 87
|
||||||
Height = 29
|
Height = 25
|
||||||
Top = 4
|
Top = 5
|
||||||
Width = 154
|
Width = 154
|
||||||
BorderSpacing.Left = 7
|
BorderSpacing.Left = 7
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
@ -148,9 +150,9 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = BuildModeComboBox
|
AnchorSideTop.Control = BuildModeComboBox
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 250
|
Left = 248
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 6
|
Top = 5
|
||||||
Width = 27
|
Width = 27
|
||||||
BorderSpacing.Left = 7
|
BorderSpacing.Left = 7
|
||||||
Caption = '...'
|
Caption = '...'
|
||||||
@ -159,9 +161,9 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
end
|
end
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 286
|
Left = 286
|
||||||
Height = 17
|
Height = 15
|
||||||
Top = 13
|
Top = 13
|
||||||
Width = 138
|
Width = 137
|
||||||
Caption = 'Under construction ...'
|
Caption = 'Under construction ...'
|
||||||
Color = clFuchsia
|
Color = clFuchsia
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -175,12 +177,12 @@ inherited IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonPanel
|
AnchorSideBottom.Control = ButtonPanel
|
||||||
Left = 259
|
Left = 259
|
||||||
Height = 317
|
Height = 320
|
||||||
Top = 40
|
Top = 40
|
||||||
Width = 413
|
Width = 413
|
||||||
HorzScrollBar.Page = 409
|
HorzScrollBar.Page = 409
|
||||||
HorzScrollBar.Tracking = True
|
HorzScrollBar.Tracking = True
|
||||||
VertScrollBar.Page = 313
|
VertScrollBar.Page = 316
|
||||||
VertScrollBar.Tracking = True
|
VertScrollBar.Tracking = True
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
@ -31,10 +31,15 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Controls, Forms, ComCtrls, LCLProc, LCLType,
|
Classes, SysUtils, Controls, Forms, ComCtrls, LCLProc, LCLType,
|
||||||
Buttons, ButtonPanel, ExtCtrls,
|
Buttons, ButtonPanel, ExtCtrls, EditBtn, StdCtrls,
|
||||||
IDEWindowIntf, IDEOptionsIntf, IDECommands, IDEHelpIntf,
|
TreeFilterEdit, IDEWindowIntf, IDEOptionsIntf, IDECommands, IDEHelpIntf,
|
||||||
EnvironmentOpts, LazarusIDEStrConsts,
|
EnvironmentOpts, LazarusIDEStrConsts, CompOptsIntf, EditorOptions,
|
||||||
CompOptsIntf, EditorOptions, TreeFilterEdit, EditBtn, StdCtrls;
|
{$IFDEF NewBuildModeWindow}
|
||||||
|
BuildModesManager, project_save_options,
|
||||||
|
{$ELSE}
|
||||||
|
BuildModesEditor,
|
||||||
|
{$ENDIF}
|
||||||
|
ProjectIntf;
|
||||||
|
|
||||||
type
|
type
|
||||||
TIDEOptsDlgAction = (
|
TIDEOptsDlgAction = (
|
||||||
@ -140,6 +145,9 @@ begin
|
|||||||
ButtonPanel.HelpButton.OnClick := @HelpButtonClick;
|
ButtonPanel.HelpButton.OnClick := @HelpButtonClick;
|
||||||
|
|
||||||
OnKeyPress:=@IDEOptionsDialogKeyPress;
|
OnKeyPress:=@IDEOptionsDialogKeyPress;
|
||||||
|
{$IFnDEF NewBuildModeWindow}
|
||||||
|
BuildModeManageButton.Visible:=False;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEOptionsDialog.HelpButtonClick(Sender: TObject);
|
procedure TIDEOptionsDialog.HelpButtonClick(Sender: TObject);
|
||||||
@ -199,8 +207,46 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEOptionsDialog.BuildModeManageButtonClick(Sender: TObject);
|
procedure TIDEOptionsDialog.BuildModeManageButtonClick(Sender: TObject);
|
||||||
|
{$IFDEF NewBuildModeWindow}
|
||||||
|
var
|
||||||
|
BuildModesForm: TBuildModesForm;
|
||||||
|
ProjectSaveOptions: TProjectSaveOptionsFrame;
|
||||||
|
Rec: PIDEOptionsGroupRec;
|
||||||
|
i: Integer;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
;
|
{$IFDEF NewBuildModeWindow}
|
||||||
|
BuildModesForm := TBuildModesForm.Create(nil);
|
||||||
|
try
|
||||||
|
BuildModesForm.OnLoadIDEOptionsHook := @LoadIDEOptions;
|
||||||
|
BuildModesForm.OnSaveIDEOptionsHook := @SaveIDEOptions;
|
||||||
|
{ Does not really work (?)
|
||||||
|
ProjectSaveOptions:=Nil;
|
||||||
|
Rec := IDEEditorGroups.GetByIndex(GroupProject);
|
||||||
|
if Rec <> nil then
|
||||||
|
begin
|
||||||
|
for i := 0 to Rec^.Items.Count-1 do begin
|
||||||
|
if Rec^.Items.Items[i]^.EditorClass = TProjectSaveOptionsFrame then begin
|
||||||
|
ProjectSaveOptions:=TProjectSaveOptionsFrame(Rec^.Items.Items[i]^.EditorClass);
|
||||||
|
Break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ProjectSaveOptions<>nil then
|
||||||
|
begin
|
||||||
|
BuildModesForm.LoadShowSessionFromProject:=false;
|
||||||
|
BuildModesForm.ShowSession:=ProjectSaveOptions.GetSessionLocation in [pssInIDEConfig,pssInProjectDir];
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
BuildModesForm.LoadShowSessionFromProject:=false;
|
||||||
|
BuildModesForm.ShowSession:=True;
|
||||||
|
if BuildModesForm.ShowModal = mrOK then begin
|
||||||
|
;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
BuildModesForm.Free;
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEOptionsDialog.CategoryTreeCollapsed(Sender: TObject; Node: TTreeNode);
|
procedure TIDEOptionsDialog.CategoryTreeCollapsed(Sender: TObject; Node: TTreeNode);
|
||||||
@ -473,9 +519,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Rec := IDEEditorGroups[i];
|
Rec := IDEEditorGroups[i];
|
||||||
//DebugLn(['TIDEOptionsDialog.CreateEditors ',Rec^.GroupClass.ClassName]);
|
//DebugLn(['TIDEOptionsDialog.CreateEditors ',Rec^.GroupClass.ClassName]);
|
||||||
if not PassesFilter(Rec) then
|
if PassesFilter(Rec) and (Rec^.Items <> nil) then
|
||||||
Continue;
|
|
||||||
if Rec^.Items <> nil then
|
|
||||||
begin
|
begin
|
||||||
if Rec^.GroupClass<>nil then
|
if Rec^.GroupClass<>nil then
|
||||||
ACaption := Rec^.GroupClass.GetGroupCaption
|
ACaption := Rec^.GroupClass.GetGroupCaption
|
||||||
|
@ -132,7 +132,10 @@ uses
|
|||||||
compiler_path_options, compiler_parsing_options, compiler_codegen_options,
|
compiler_path_options, compiler_parsing_options, compiler_codegen_options,
|
||||||
compiler_linking_options, compiler_verbosity_options, compiler_messages_options,
|
compiler_linking_options, compiler_verbosity_options, compiler_messages_options,
|
||||||
compiler_other_options, compiler_inherited_options, compiler_compilation_options,
|
compiler_other_options, compiler_inherited_options, compiler_compilation_options,
|
||||||
BuildModesEditor, compiler_buildmacro_options, IdeMacroValues,
|
compiler_buildmacro_options, IdeMacroValues,
|
||||||
|
{.$IFnDEF NewBuildModeWindow} // remove '.' to remove the BuildModesEditor options frame
|
||||||
|
BuildModesEditor,
|
||||||
|
{.$ENDIF}
|
||||||
// package option frames
|
// package option frames
|
||||||
package_usage_options, package_description_options, package_integration_options,
|
package_usage_options, package_description_options, package_integration_options,
|
||||||
package_provides_options, package_i18n_options,
|
package_provides_options, package_i18n_options,
|
||||||
@ -3514,7 +3517,9 @@ end;
|
|||||||
|
|
||||||
procedure TMainIDE.mnuChgBuildModeClicked(Sender: TObject);
|
procedure TMainIDE.mnuChgBuildModeClicked(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
{.$IFnDEF NewBuildModeWindow} // remove '.' to remove the BuildModesEditor options frame
|
||||||
DoOpenIDEOptions(TBuildModesEditorFrame, '', [TProjectCompilerOptions], []);
|
DoOpenIDEOptions(TBuildModesEditorFrame, '', [TProjectCompilerOptions], []);
|
||||||
|
{.$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.mnuSetBuildModeClick(Sender: TObject);
|
procedure TMainIDE.mnuSetBuildModeClick(Sender: TObject);
|
||||||
|
Loading…
Reference in New Issue
Block a user