mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 17:15:58 +02:00
IDE: Remove the useless "Use Buildmodes" setting and CheckBox.
git-svn-id: trunk@58873 -
This commit is contained in:
parent
9347bbad86
commit
d151af12fb
@ -548,7 +548,6 @@ type
|
|||||||
FTestBuildDirHistory: TStringList;
|
FTestBuildDirHistory: TStringList;
|
||||||
FCompilerMessagesFileHistory: TStringList;
|
FCompilerMessagesFileHistory: TStringList;
|
||||||
FBuildMatrixOptions: TBuildMatrixOptions;
|
FBuildMatrixOptions: TBuildMatrixOptions;
|
||||||
FUseBuildModes: Boolean;
|
|
||||||
FIsGlobalMode: TStrToBoolEvent;
|
FIsGlobalMode: TStrToBoolEvent;
|
||||||
|
|
||||||
// Clean build project dialog
|
// Clean build project dialog
|
||||||
@ -815,7 +814,6 @@ type
|
|||||||
|
|
||||||
// global build options
|
// global build options
|
||||||
property BuildMatrixOptions: TBuildMatrixOptions read FBuildMatrixOptions;
|
property BuildMatrixOptions: TBuildMatrixOptions read FBuildMatrixOptions;
|
||||||
property UseBuildModes: Boolean read FUseBuildModes write FUseBuildModes;
|
|
||||||
|
|
||||||
// Clean build project dialog
|
// Clean build project dialog
|
||||||
property CleanBuildProjOut: Boolean read FCleanBuildProjOut write FCleanBuildProjOut;
|
property CleanBuildProjOut: Boolean read FCleanBuildProjOut write FCleanBuildProjOut;
|
||||||
@ -1938,7 +1936,6 @@ begin
|
|||||||
FConfigStore.AppendBasePath('BuildMatrix');
|
FConfigStore.AppendBasePath('BuildMatrix');
|
||||||
FBuildMatrixOptions.LoadFromConfig(FConfigStore);
|
FBuildMatrixOptions.LoadFromConfig(FConfigStore);
|
||||||
FConfigStore.UndoAppendBasePath;
|
FConfigStore.UndoAppendBasePath;
|
||||||
FUseBuildModes:=FXMLCfg.GetValue(Path+'Build/UseBuildModes',false);
|
|
||||||
|
|
||||||
// Clean build project dialog
|
// Clean build project dialog
|
||||||
FCleanBuildProjOut:=FXMLCfg.GetValue(Path+'CleanBuild/ProjOut',true);
|
FCleanBuildProjOut:=FXMLCfg.GetValue(Path+'CleanBuild/ProjOut',true);
|
||||||
@ -2320,7 +2317,6 @@ begin
|
|||||||
FConfigStore.AppendBasePath('BuildMatrix');
|
FConfigStore.AppendBasePath('BuildMatrix');
|
||||||
FBuildMatrixOptions.SaveToConfig(FConfigStore,IsGlobalMode);
|
FBuildMatrixOptions.SaveToConfig(FConfigStore,IsGlobalMode);
|
||||||
FConfigStore.UndoAppendBasePath;
|
FConfigStore.UndoAppendBasePath;
|
||||||
FXMLCfg.SetDeleteValue(Path+'Build/UseBuildModes',FUseBuildModes,false);
|
|
||||||
|
|
||||||
// Clean build project dialog
|
// Clean build project dialog
|
||||||
FXMLCfg.SetDeleteValue(Path+'CleanBuild/ProjOut',FCleanBuildProjOut,true);
|
FXMLCfg.SetDeleteValue(Path+'CleanBuild/ProjOut',FCleanBuildProjOut,true);
|
||||||
|
@ -753,10 +753,7 @@ end;
|
|||||||
|
|
||||||
function TCompOptModeMatrixFrame.ActiveModeAsText: string;
|
function TCompOptModeMatrixFrame.ActiveModeAsText: string;
|
||||||
begin
|
begin
|
||||||
if EnvironmentOptions.UseBuildModes then
|
Result:=Grid.Modes[Grid.ActiveMode].Caption;
|
||||||
Result:=Grid.Modes[Grid.ActiveMode].Caption
|
|
||||||
else
|
|
||||||
Result:=LazProject.BuildModes[0].GetCaption;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompOptModeMatrixFrame.CreateNewOption(aTyp, aValue: string);
|
procedure TCompOptModeMatrixFrame.CreateNewOption(aTyp, aValue: string);
|
||||||
@ -996,14 +993,12 @@ var
|
|||||||
aMode: TGroupedMatrixMode;
|
aMode: TGroupedMatrixMode;
|
||||||
BuildMode: TProjectBuildMode;
|
BuildMode: TProjectBuildMode;
|
||||||
BuildModes: TProjectBuildModes;
|
BuildModes: TProjectBuildModes;
|
||||||
BuildModeCount: integer;
|
|
||||||
begin
|
begin
|
||||||
GridHasChanged:=false;
|
GridHasChanged:=false;
|
||||||
ValuesHaveChanged:=false;
|
ValuesHaveChanged:=false;
|
||||||
|
|
||||||
// add/update build modes
|
// add/update build modes
|
||||||
BuildModes:=LazProject.BuildModes;
|
BuildModes:=LazProject.BuildModes;
|
||||||
if EnvironmentOptions.UseBuildModes then begin
|
|
||||||
for i:=0 to BuildModes.Count-1 do begin
|
for i:=0 to BuildModes.Count-1 do begin
|
||||||
BuildMode:=BuildModes[i];
|
BuildMode:=BuildModes[i];
|
||||||
aColor:=clDefault;
|
aColor:=clDefault;
|
||||||
@ -1025,12 +1020,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
BuildModeCount:=BuildModes.Count;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
BuildModeCount:=0;
|
|
||||||
// delete leftover build modes
|
// delete leftover build modes
|
||||||
while Grid.Modes.Count>BuildModeCount do begin
|
while Grid.Modes.Count>BuildModes.Count do begin
|
||||||
Grid.Modes.Delete(Grid.Modes.Count-1);
|
Grid.Modes.Delete(Grid.Modes.Count-1);
|
||||||
GridHasChanged:=true;
|
GridHasChanged:=true;
|
||||||
end;
|
end;
|
||||||
@ -1052,10 +1043,7 @@ procedure TCompOptModeMatrixFrame.UpdateActiveMode;
|
|||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
if EnvironmentOptions.UseBuildModes then
|
i:=LazProject.BuildModes.IndexOf(LazProject.ActiveBuildMode);
|
||||||
i:=LazProject.BuildModes.IndexOf(LazProject.ActiveBuildMode)
|
|
||||||
else
|
|
||||||
i:=-1;
|
|
||||||
if i>=Grid.Modes.Count then exit;
|
if i>=Grid.Modes.Count then exit;
|
||||||
Grid.ActiveMode:=i;
|
Grid.ActiveMode:=i;
|
||||||
end;
|
end;
|
||||||
|
@ -12,6 +12,7 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
Constraints.MinWidth = 500
|
Constraints.MinWidth = 500
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
|
LCLVersion = '1.9.0.0'
|
||||||
object ButtonPanel: TButtonPanel
|
object ButtonPanel: TButtonPanel
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
@ -64,8 +65,8 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = SettingsPanel
|
AnchorSideBottom.Control = SettingsPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 407
|
Height = 417
|
||||||
Top = 33
|
Top = 37
|
||||||
Width = 249
|
Width = 249
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -83,7 +84,7 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideTop.Control = CategoryPanel
|
AnchorSideTop.Control = CategoryPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 21
|
Height = 25
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 249
|
Width = 249
|
||||||
OnFilterItem = FilterEditFilterItem
|
OnFilterItem = FilterEditFilterItem
|
||||||
@ -98,8 +99,8 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
end
|
end
|
||||||
object SettingsPanel: TPanel
|
object SettingsPanel: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 20
|
Height = 6
|
||||||
Top = 440
|
Top = 454
|
||||||
Width = 255
|
Width = 255
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -124,16 +125,16 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
ClientWidth = 535
|
ClientWidth = 535
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object BuildModeComboBox: TComboBox
|
object BuildModeComboBox: TComboBox
|
||||||
AnchorSideLeft.Control = UseBuildModeCheckBox
|
AnchorSideLeft.Control = BuildModesLabel
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = UseBuildModeCheckBox
|
AnchorSideTop.Control = BuildModesLabel
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 93
|
Left = 125
|
||||||
Height = 21
|
Height = 35
|
||||||
Top = 5
|
Top = -1
|
||||||
Width = 175
|
Width = 175
|
||||||
BorderSpacing.Left = 7
|
BorderSpacing.Left = 6
|
||||||
ItemHeight = 13
|
ItemHeight = 0
|
||||||
OnSelect = BuildModeComboBoxSelect
|
OnSelect = BuildModeComboBoxSelect
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -144,9 +145,9 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
AnchorSideTop.Control = BuildModeComboBox
|
AnchorSideTop.Control = BuildModeComboBox
|
||||||
AnchorSideBottom.Control = BuildModeComboBox
|
AnchorSideBottom.Control = BuildModeComboBox
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 269
|
Left = 301
|
||||||
Height = 21
|
Height = 35
|
||||||
Top = 5
|
Top = -1
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
BorderSpacing.Left = 1
|
BorderSpacing.Left = 1
|
||||||
@ -154,18 +155,13 @@ object IDEOptionsDialog: TIDEOptionsDialog
|
|||||||
OnClick = BuildModeManageButtonClick
|
OnClick = BuildModeManageButtonClick
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object UseBuildModeCheckBox: TCheckBox
|
object BuildModesLabel: TLabel
|
||||||
AnchorSideTop.Side = asrCenter
|
|
||||||
Left = 12
|
Left = 12
|
||||||
Height = 17
|
Height = 19
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 74
|
Width = 107
|
||||||
BorderSpacing.Left = 6
|
Caption = 'BuildModesLabel'
|
||||||
Caption = 'Build modes'
|
ParentColor = False
|
||||||
OnChange = UseBuildModeCheckBoxChange
|
|
||||||
ParentShowHint = False
|
|
||||||
ShowHint = True
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object EditorsPanel: TScrollBox
|
object EditorsPanel: TScrollBox
|
||||||
|
@ -58,7 +58,6 @@ type
|
|||||||
|
|
||||||
TIDEOptionsDialog = class(TAbstractOptionsEditorDialog)
|
TIDEOptionsDialog = class(TAbstractOptionsEditorDialog)
|
||||||
BuildModeComboBox: TComboBox;
|
BuildModeComboBox: TComboBox;
|
||||||
UseBuildModeCheckBox: TCheckBox;
|
|
||||||
BuildModeManageButton: TButton;
|
BuildModeManageButton: TButton;
|
||||||
BuildModeSelectPanel: TPanel;
|
BuildModeSelectPanel: TPanel;
|
||||||
ButtonPanel: TButtonPanel;
|
ButtonPanel: TButtonPanel;
|
||||||
@ -67,8 +66,8 @@ type
|
|||||||
CatTVSplitter: TSplitter;
|
CatTVSplitter: TSplitter;
|
||||||
EditorsPanel: TScrollBox;
|
EditorsPanel: TScrollBox;
|
||||||
FilterEdit: TTreeFilterEdit;
|
FilterEdit: TTreeFilterEdit;
|
||||||
|
BuildModesLabel: TLabel;
|
||||||
SettingsPanel: TPanel;
|
SettingsPanel: TPanel;
|
||||||
procedure UseBuildModeCheckBoxChange(Sender: TObject);
|
|
||||||
procedure BuildModeComboBoxSelect(Sender: TObject);
|
procedure BuildModeComboBoxSelect(Sender: TObject);
|
||||||
procedure BuildModeManageButtonClick(Sender: TObject);
|
procedure BuildModeManageButtonClick(Sender: TObject);
|
||||||
procedure CategoryTreeChange(Sender: TObject; Node: TTreeNode);
|
procedure CategoryTreeChange(Sender: TObject; Node: TTreeNode);
|
||||||
@ -131,27 +130,6 @@ implementation
|
|||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
|
|
||||||
const
|
|
||||||
LazUtilsPkg = 'LazUtils';
|
|
||||||
|
|
||||||
function HasLazUtilsDependency: Boolean;
|
|
||||||
begin
|
|
||||||
Result := Assigned(Project1.FindDependencyByName('LCL'))
|
|
||||||
or Assigned(Project1.FindDependencyByName(LazUtilsPkg));
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure AddLazUtilsDependency;
|
|
||||||
var
|
|
||||||
Dep: TPkgDependency;
|
|
||||||
begin
|
|
||||||
if HasLazUtilsDependency then Exit;
|
|
||||||
Project1.AddPackageDependency(LazUtilsPkg);
|
|
||||||
Dep:=Project1.FindDependencyByName(LazUtilsPkg);
|
|
||||||
if Assigned(Dep) then
|
|
||||||
PackageGraph.OpenDependency(Dep,false);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TIDEOptionsDialog }
|
{ TIDEOptionsDialog }
|
||||||
|
|
||||||
constructor TIDEOptionsDialog.Create(AOwner: TComponent);
|
constructor TIDEOptionsDialog.Create(AOwner: TComponent);
|
||||||
@ -161,10 +139,8 @@ begin
|
|||||||
FEditorsCreated := False;
|
FEditorsCreated := False;
|
||||||
FEditorToOpen := nil;
|
FEditorToOpen := nil;
|
||||||
SetBuildModeVisibility(False);
|
SetBuildModeVisibility(False);
|
||||||
UseBuildModeCheckBox.Caption:=lisBuildModes;
|
|
||||||
|
|
||||||
IDEDialogLayoutList.ApplyLayout(Self);
|
|
||||||
Caption := dlgIDEOptions;
|
Caption := dlgIDEOptions;
|
||||||
|
BuildModesLabel.Caption := lisBuildModes;
|
||||||
ButtonPanel.OKButton.Caption := lisMenuOk;
|
ButtonPanel.OKButton.Caption := lisMenuOk;
|
||||||
ButtonPanel.OKButton.OnClick := @OKButtonClick;
|
ButtonPanel.OKButton.OnClick := @OKButtonClick;
|
||||||
ButtonPanel.OKButton.ModalResult := mrNone;
|
ButtonPanel.OKButton.ModalResult := mrNone;
|
||||||
@ -172,6 +148,7 @@ begin
|
|||||||
ButtonPanel.CancelButton.OnClick := @CancelButtonClick;
|
ButtonPanel.CancelButton.OnClick := @CancelButtonClick;
|
||||||
ButtonPanel.HelpButton.Caption:= lisMenuHelp;
|
ButtonPanel.HelpButton.Caption:= lisMenuHelp;
|
||||||
ButtonPanel.HelpButton.OnClick := @HelpButtonClick;
|
ButtonPanel.HelpButton.OnClick := @HelpButtonClick;
|
||||||
|
IDEDialogLayoutList.ApplyLayout(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEOptionsDialog.FormShow(Sender: TObject);
|
procedure TIDEOptionsDialog.FormShow(Sender: TObject);
|
||||||
@ -232,17 +209,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEOptionsDialog.UseBuildModeCheckBoxChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
EnvironmentOptions.UseBuildModes:=(Sender as TCheckBox).Checked;
|
|
||||||
UpdateBuildModeButtons;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TIDEOptionsDialog.BuildModeComboBoxSelect(Sender: TObject);
|
procedure TIDEOptionsDialog.BuildModeComboBoxSelect(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if AllBuildModes then begin
|
if AllBuildModes then
|
||||||
ShowMessage(lisThisWillAllowChangingAllBuildModesAtOnceNotImpleme);
|
ShowMessage(lisThisWillAllowChangingAllBuildModesAtOnceNotImpleme)
|
||||||
end
|
|
||||||
else begin
|
else begin
|
||||||
Assert(BuildModeSelectPanel.Visible, 'BuildModeComboBoxSelect: BuildModeSelectPanel not Visible');
|
Assert(BuildModeSelectPanel.Visible, 'BuildModeComboBoxSelect: BuildModeSelectPanel not Visible');
|
||||||
SwitchBuildMode(BuildModeComboBox.Text);
|
SwitchBuildMode(BuildModeComboBox.Text);
|
||||||
@ -644,17 +614,8 @@ end;
|
|||||||
|
|
||||||
procedure TIDEOptionsDialog.UpdateBuildModeButtons;
|
procedure TIDEOptionsDialog.UpdateBuildModeButtons;
|
||||||
var
|
var
|
||||||
ManyBuildModes: Boolean;
|
|
||||||
ModeMatrix: TCompOptModeMatrixFrame;
|
ModeMatrix: TCompOptModeMatrixFrame;
|
||||||
begin
|
begin
|
||||||
ManyBuildModes:=Project1.BuildModes.Count > 1;
|
|
||||||
if ManyBuildModes then
|
|
||||||
EnvironmentOptions.UseBuildModes := True;
|
|
||||||
UseBuildModeCheckBox.Checked:=EnvironmentOptions.UseBuildModes;
|
|
||||||
UseBuildModeCheckBox.Enabled := not ManyBuildModes;
|
|
||||||
BuildModeComboBox.Visible := EnvironmentOptions.UseBuildModes;
|
|
||||||
BuildModeManageButton.Visible := EnvironmentOptions.UseBuildModes;
|
|
||||||
|
|
||||||
ModeMatrix:=TCompOptModeMatrixFrame(FindEditor(TCompOptModeMatrixFrame));
|
ModeMatrix:=TCompOptModeMatrixFrame(FindEditor(TCompOptModeMatrixFrame));
|
||||||
if Assigned(ModeMatrix) then
|
if Assigned(ModeMatrix) then
|
||||||
ModeMatrix.UpdateModes;
|
ModeMatrix.UpdateModes;
|
||||||
|
Loading…
Reference in New Issue
Block a user