IDE: Make the checkboxes in Clean Build Dialog persistent. Issue #29810.

git-svn-id: trunk@51924 -
This commit is contained in:
juha 2016-03-11 22:59:58 +00:00
parent 2feaa60235
commit 4a3707c89c
4 changed files with 76 additions and 39 deletions

View File

@ -1,22 +1,22 @@
object CleanBuildProjectDialog: TCleanBuildProjectDialog object CleanBuildProjectDialog: TCleanBuildProjectDialog
Left = 275 Left = 275
Height = 492 Height = 545
Top = 250 Top = 250
Width = 537 Width = 537
BorderIcons = [biSystemMenu, biMaximize] BorderIcons = [biSystemMenu, biMaximize]
Caption = 'CleanBuildProjectDialog' Caption = 'CleanBuildProjectDialog'
ClientHeight = 492 ClientHeight = 545
ClientWidth = 537 ClientWidth = 537
OnClose = FormClose OnClose = FormClose
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy OnDestroy = FormDestroy
OnResize = FormResize OnResize = FormResize
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '1.5' LCLVersion = '1.7'
object ButtonPanel1: TButtonPanel object ButtonPanel1: TButtonPanel
Left = 6 Left = 6
Height = 37 Height = 36
Top = 449 Top = 503
Width = 525 Width = 525
OKButton.Name = 'OKButton' OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True OKButton.DefaultCaption = True
@ -36,9 +36,9 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideTop.Control = ProjOutMaskComboBox AnchorSideTop.Control = ProjOutMaskComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 10 Left = 10
Height = 24 Height = 21
Top = 12 Top = 15
Width = 145 Width = 137
BorderSpacing.Left = 10 BorderSpacing.Left = 10
Caption = 'ProjOutCheckBox' Caption = 'ProjOutCheckBox'
Checked = True Checked = True
@ -51,9 +51,9 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideTop.Control = ProjSrcMaskComboBox AnchorSideTop.Control = ProjSrcMaskComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 10 Left = 10
Height = 24 Height = 21
Top = 47 Top = 49
Width = 141 Width = 133
Caption = 'ProjSrcCheckBox' Caption = 'ProjSrcCheckBox'
Checked = True Checked = True
OnChange = ProjSrcCheckBoxChange OnChange = ProjSrcCheckBoxChange
@ -65,9 +65,9 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideTop.Control = PkgOutMaskComboBox AnchorSideTop.Control = PkgOutMaskComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 10 Left = 10
Height = 24 Height = 21
Top = 82 Top = 83
Width = 142 Width = 134
Caption = 'PkgOutCheckBox' Caption = 'PkgOutCheckBox'
Checked = True Checked = True
OnChange = PkgOutCheckBoxChange OnChange = PkgOutCheckBoxChange
@ -79,9 +79,9 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideTop.Control = PkgSrcMaskComboBox AnchorSideTop.Control = PkgSrcMaskComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 10 Left = 10
Height = 24 Height = 21
Top = 117 Top = 117
Width = 138 Width = 130
Caption = 'PkgSrcCheckBox' Caption = 'PkgSrcCheckBox'
Checked = True Checked = True
OnChange = PkgSrcCheckBoxChange OnChange = PkgSrcCheckBoxChange
@ -93,13 +93,13 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 232 Left = 232
Height = 29 Height = 31
Top = 10 Top = 10
Width = 299 Width = 299
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 10 BorderSpacing.Top = 10
BorderSpacing.Right = 6 BorderSpacing.Right = 6
ItemHeight = 0 ItemHeight = 23
OnChange = ProjOutMaskComboBoxChange OnChange = ProjOutMaskComboBoxChange
TabOrder = 4 TabOrder = 4
Text = 'ProjOutMaskComboBox' Text = 'ProjOutMaskComboBox'
@ -111,12 +111,12 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideRight.Control = ProjOutMaskComboBox AnchorSideRight.Control = ProjOutMaskComboBox
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 232 Left = 232
Height = 29 Height = 31
Top = 45 Top = 44
Width = 299 Width = 299
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6 BorderSpacing.Top = 3
ItemHeight = 0 ItemHeight = 23
OnChange = ProjOutMaskComboBoxChange OnChange = ProjOutMaskComboBoxChange
TabOrder = 5 TabOrder = 5
Text = 'ProjSrcMaskComboBox' Text = 'ProjSrcMaskComboBox'
@ -128,12 +128,12 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideRight.Control = ProjOutMaskComboBox AnchorSideRight.Control = ProjOutMaskComboBox
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 232 Left = 232
Height = 29 Height = 31
Top = 80 Top = 78
Width = 299 Width = 299
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6 BorderSpacing.Top = 3
ItemHeight = 0 ItemHeight = 23
OnChange = ProjOutMaskComboBoxChange OnChange = ProjOutMaskComboBoxChange
TabOrder = 6 TabOrder = 6
Text = 'PkgOutMaskComboBox' Text = 'PkgOutMaskComboBox'
@ -145,12 +145,12 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideRight.Control = ProjOutMaskComboBox AnchorSideRight.Control = ProjOutMaskComboBox
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 232 Left = 232
Height = 29 Height = 31
Top = 115 Top = 112
Width = 299 Width = 299
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6 BorderSpacing.Top = 3
ItemHeight = 0 ItemHeight = 23
OnChange = ProjOutMaskComboBoxChange OnChange = ProjOutMaskComboBoxChange
TabOrder = 7 TabOrder = 7
Text = 'PkgSrcMaskComboBox' Text = 'PkgSrcMaskComboBox'
@ -159,10 +159,10 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideRight.Control = ProjOutMaskComboBox AnchorSideRight.Control = ProjOutMaskComboBox
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonPanel1 AnchorSideBottom.Control = ButtonPanel1
Left = 429 Left = 438
Height = 29 Height = 27
Top = 414 Top = 470
Width = 102 Width = 93
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
@ -179,8 +179,8 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = DeleteButton AnchorSideBottom.Control = DeleteButton
Left = 10 Left = 10
Height = 235 Height = 292
Top = 173 Top = 172
Width = 521 Width = 521
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
ReadOnly = True ReadOnly = True
@ -194,8 +194,8 @@ object CleanBuildProjectDialog: TCleanBuildProjectDialog
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 10 Left = 10
Height = 17 Height = 17
Top = 150 Top = 149
Width = 90 Width = 79
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
Caption = 'PreviewLabel' Caption = 'PreviewLabel'

View File

@ -37,7 +37,7 @@ uses
IDEDialogs, IDEImagesIntf, PackageIntf, IDEDialogs, IDEImagesIntf, PackageIntf,
// IDE // IDE
PackageDefs, PackageSystem, InputHistory, LazarusIDEStrConsts, Project, PackageDefs, PackageSystem, InputHistory, LazarusIDEStrConsts, Project,
IDEProcs; EnvironmentOpts, IDEProcs;
type type
TBuildProjectDialogItem = class TBuildProjectDialogItem = class
@ -160,6 +160,11 @@ procedure TCleanBuildProjectDialog.FormClose(Sender: TObject;
end; end;
begin begin
EnvironmentOptions.CleanBuildProjOut:=ProjOutCheckBox.Checked;
EnvironmentOptions.CleanBuildProjSrc:=ProjSrcCheckBox.Checked;
EnvironmentOptions.CleanBuildPkgOut :=PkgOutCheckBox.Checked;
EnvironmentOptions.CleanBuildPkgSrc :=PkgSrcCheckBox.Checked;
FProject.CleanOutputFileMask:=ProjOutMaskComboBox.Text; FProject.CleanOutputFileMask:=ProjOutMaskComboBox.Text;
FProject.CleanSourcesFileMask:=ProjSrcMaskComboBox.Text; FProject.CleanSourcesFileMask:=ProjSrcMaskComboBox.Text;
InputHistories.CleanOutputFileMask:=PkgOutMaskComboBox.Text; InputHistories.CleanOutputFileMask:=PkgOutMaskComboBox.Text;
@ -588,6 +593,11 @@ begin
PkgSrcMaskComboBox.Items.Assign(List); PkgSrcMaskComboBox.Items.Assign(List);
PkgSrcMaskComboBox.Text:=InputHistories.CleanSourcesFileMask; PkgSrcMaskComboBox.Text:=InputHistories.CleanSourcesFileMask;
ProjOutCheckBox.Checked:=EnvironmentOptions.CleanBuildProjOut;
ProjSrcCheckBox.Checked:=EnvironmentOptions.CleanBuildProjSrc;
PkgOutCheckBox.Checked :=EnvironmentOptions.CleanBuildPkgOut;
PkgSrcCheckBox.Checked :=EnvironmentOptions.CleanBuildPkgSrc;
if AProject.CompilerOptions.UnitOutputDirectory='' then begin if AProject.CompilerOptions.UnitOutputDirectory='' then begin
ProjOutCheckBox.Enabled:=false; ProjOutCheckBox.Enabled:=false;
ProjOutCheckBox.Checked:=false; ProjOutCheckBox.Checked:=false;

View File

@ -481,6 +481,12 @@ type
FUseBuildModes: Boolean; FUseBuildModes: Boolean;
FIsGlobalMode: TStrToBoolEvent; FIsGlobalMode: TStrToBoolEvent;
// Clean build project dialog
FCleanBuildProjOut: Boolean;
FCleanBuildProjSrc: Boolean;
FCleanBuildPkgOut: Boolean;
FCleanBuildPkgSrc: Boolean;
// Primary-config verification // Primary-config verification
FLastCalledByLazarusFullPath: String; FLastCalledByLazarusFullPath: String;
@ -730,6 +736,12 @@ type
property BuildMatrixOptions: TBuildMatrixOptions read FBuildMatrixOptions; property BuildMatrixOptions: TBuildMatrixOptions read FBuildMatrixOptions;
property UseBuildModes: Boolean read FUseBuildModes write FUseBuildModes; property UseBuildModes: Boolean read FUseBuildModes write FUseBuildModes;
// Clean build project dialog
property CleanBuildProjOut: Boolean read FCleanBuildProjOut write FCleanBuildProjOut;
property CleanBuildProjSrc: Boolean read FCleanBuildProjSrc write FCleanBuildProjSrc;
property CleanBuildPkgOut: Boolean read FCleanBuildPkgOut write FCleanBuildPkgOut;
property CleanBuildPkgSrc: Boolean read FCleanBuildPkgSrc write FCleanBuildPkgSrc;
// Debugger // Debugger
procedure SaveDebuggerPropertiesList; procedure SaveDebuggerPropertiesList;
procedure SaveDebuggerProperties(DebuggerClass: String; Properties: TDebuggerProperties); procedure SaveDebuggerProperties(DebuggerClass: String; Properties: TDebuggerProperties);
@ -1616,6 +1628,12 @@ begin
FConfigStore.UndoAppendBasePath; FConfigStore.UndoAppendBasePath;
FUseBuildModes:=FXMLCfg.GetValue(Path+'Build/UseBuildModes',false); FUseBuildModes:=FXMLCfg.GetValue(Path+'Build/UseBuildModes',false);
// Clean build project dialog
FCleanBuildProjOut:=FXMLCfg.GetValue(Path+'CleanBuild/ProjOut',true);
FCleanBuildProjSrc:=FXMLCfg.GetValue(Path+'CleanBuild/ProjSrc',true);
FCleanBuildPkgOut:=FXMLCfg.GetValue(Path+'CleanBuild/PkgOut',true);
FCleanBuildPkgSrc:=FXMLCfg.GetValue(Path+'CleanBuild/PkgSrc',true);
// backup // backup
LoadBackupInfo(FBackupInfoProjectFiles,Path+'BackupProjectFiles/',DefaultBackupTypeProject); LoadBackupInfo(FBackupInfoProjectFiles,Path+'BackupProjectFiles/',DefaultBackupTypeProject);
LoadBackupInfo(FBackupInfoOtherFiles,Path+'BackupOtherFiles/',DefaultBackupTypeOther); LoadBackupInfo(FBackupInfoOtherFiles,Path+'BackupOtherFiles/',DefaultBackupTypeOther);
@ -1984,6 +2002,12 @@ begin
FConfigStore.UndoAppendBasePath; FConfigStore.UndoAppendBasePath;
FXMLCfg.SetDeleteValue(Path+'Build/UseBuildModes',FUseBuildModes,false); FXMLCfg.SetDeleteValue(Path+'Build/UseBuildModes',FUseBuildModes,false);
// Clean build project dialog
FXMLCfg.SetDeleteValue(Path+'CleanBuild/ProjOut',FCleanBuildProjOut,true);
FXMLCfg.SetDeleteValue(Path+'CleanBuild/ProjSrc',FCleanBuildProjSrc,true);
FXMLCfg.SetDeleteValue(Path+'CleanBuild/PkgOut',FCleanBuildPkgOut,true);
FXMLCfg.SetDeleteValue(Path+'CleanBuild/PkgSrc',FCleanBuildPkgSrc,true);
// backup // backup
SaveBackupInfo(FBackupInfoProjectFiles,Path+'BackupProjectFiles/',DefaultBackupTypeProject); SaveBackupInfo(FBackupInfoProjectFiles,Path+'BackupProjectFiles/',DefaultBackupTypeProject);
SaveBackupInfo(FBackupInfoOtherFiles,Path+'BackupOtherFiles/',DefaultBackupTypeOther); SaveBackupInfo(FBackupInfoOtherFiles,Path+'BackupOtherFiles/',DefaultBackupTypeOther);

View File

@ -5999,6 +5999,8 @@ resourcestring
lisCleanUpAndBuildProject = 'Clean up and build project'; lisCleanUpAndBuildProject = 'Clean up and build project';
lisBuildFollowingModes = 'Build the following modes'; lisBuildFollowingModes = 'Build the following modes';
lisSelectedModesWereBuilt = 'Selected %d modes were successfully built.'; lisSelectedModesWereBuilt = 'Selected %d modes were successfully built.';
// Clean Build Project Dialog
lisProjectOutputDirectory = 'Project output directory'; lisProjectOutputDirectory = 'Project output directory';
lisProjectSourceDirectories = 'Project source directories'; lisProjectSourceDirectories = 'Project source directories';
lisPackageOutputDirectories = 'Package output directories'; lisPackageOutputDirectories = 'Package output directories';
@ -6007,6 +6009,7 @@ resourcestring
lisCleanUpAndBuild = 'Clean up and build'; lisCleanUpAndBuild = 'Clean up and build';
lisCBPFiles = '%s (%s files)'; lisCBPFiles = '%s (%s files)';
lisCBPReallyDeleteSourceFiles = 'Really delete %s source files%s%s'; lisCBPReallyDeleteSourceFiles = 'Really delete %s source files%s%s';
lisChangesWereNotSaved = 'Changes were not saved'; lisChangesWereNotSaved = 'Changes were not saved';
lisDoYouStillWantToOpenAnotherProject = 'Do you still want to open another project?'; lisDoYouStillWantToOpenAnotherProject = 'Do you still want to open another project?';
lisDiscardChangesAndOpenProject = 'Discard changes and open project'; lisDiscardChangesAndOpenProject = 'Discard changes and open project';