mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 04:39:22 +02:00
IDE: In ConfigureBuildLazarusDlg, show a single checkbox for "Clean common files" when installation dir is read-only.
git-svn-id: trunk@44449 -
This commit is contained in:
parent
042680da83
commit
7c3e1eeadf
@ -1,7 +1,7 @@
|
|||||||
object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
|
object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
|
||||||
Left = 349
|
Left = 378
|
||||||
Height = 480
|
Height = 480
|
||||||
Top = 200
|
Top = 195
|
||||||
Width = 700
|
Width = 700
|
||||||
VertScrollBar.Visible = False
|
VertScrollBar.Visible = False
|
||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
@ -488,6 +488,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
|
|||||||
Width = 189
|
Width = 189
|
||||||
Caption = 'CleanAutoRadioButton'
|
Caption = 'CleanAutoRadioButton'
|
||||||
Checked = True
|
Checked = True
|
||||||
|
OnClick = CleanRadioButtonClick
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TabStop = True
|
TabStop = True
|
||||||
end
|
end
|
||||||
@ -497,6 +498,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
|
|||||||
Top = 27
|
Top = 27
|
||||||
Width = 189
|
Width = 189
|
||||||
Caption = 'CleanCommonRadioButton'
|
Caption = 'CleanCommonRadioButton'
|
||||||
|
OnClick = CleanRadioButtonClick
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object CleanAllRadioButton: TRadioButton
|
object CleanAllRadioButton: TRadioButton
|
||||||
@ -505,6 +507,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
|
|||||||
Top = 48
|
Top = 48
|
||||||
Width = 189
|
Width = 189
|
||||||
Caption = 'CleanAllRadioButton'
|
Caption = 'CleanAllRadioButton'
|
||||||
|
OnClick = CleanRadioButtonClick
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object CleanOnceCheckBox: TCheckBox
|
object CleanOnceCheckBox: TCheckBox
|
||||||
@ -516,6 +519,18 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
|
|||||||
Caption = 'CleanOnceCheckBox'
|
Caption = 'CleanOnceCheckBox'
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
|
object CleanCommonCheckBox: TCheckBox
|
||||||
|
AnchorSideTop.Control = CleanAutoRadioButton
|
||||||
|
Left = 6
|
||||||
|
Height = 21
|
||||||
|
Top = 12
|
||||||
|
Width = 173
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
Caption = 'CleanCommonCheckBox'
|
||||||
|
OnClick = CleanCommonCheckBoxClick
|
||||||
|
TabOrder = 4
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -81,6 +81,7 @@ type
|
|||||||
CleanAutoRadioButton: TRadioButton;
|
CleanAutoRadioButton: TRadioButton;
|
||||||
CleanCommonRadioButton: TRadioButton;
|
CleanCommonRadioButton: TRadioButton;
|
||||||
CleanOnceCheckBox: TCheckBox;
|
CleanOnceCheckBox: TCheckBox;
|
||||||
|
CleanCommonCheckBox: TCheckBox;
|
||||||
CommonsDividerBevel: TDividerBevel;
|
CommonsDividerBevel: TDividerBevel;
|
||||||
ConfirmBuildCheckBox: TCheckBox;
|
ConfirmBuildCheckBox: TCheckBox;
|
||||||
DefinesButton: TButton;
|
DefinesButton: TButton;
|
||||||
@ -119,6 +120,8 @@ type
|
|||||||
UpdateRevisionIncCheckBox: TCheckBox;
|
UpdateRevisionIncCheckBox: TCheckBox;
|
||||||
procedure BuildProfileButtonClick(Sender: TObject);
|
procedure BuildProfileButtonClick(Sender: TObject);
|
||||||
procedure BuildProfileComboBoxSelect(Sender: TObject);
|
procedure BuildProfileComboBoxSelect(Sender: TObject);
|
||||||
|
procedure CleanRadioButtonClick(Sender: TObject);
|
||||||
|
procedure CleanCommonCheckBoxClick(Sender: TObject);
|
||||||
procedure CompileAdvancedButtonClick(Sender: TObject);
|
procedure CompileAdvancedButtonClick(Sender: TObject);
|
||||||
procedure CompileButtonClick(Sender: TObject);
|
procedure CompileButtonClick(Sender: TObject);
|
||||||
procedure DefinesButtonClick(Sender: TObject);
|
procedure DefinesButtonClick(Sender: TObject);
|
||||||
@ -956,6 +959,7 @@ begin
|
|||||||
CleanAllRadioButton.Caption:=lisCleanAll;
|
CleanAllRadioButton.Caption:=lisCleanAll;
|
||||||
CleanOnceCheckBox.Caption:=lisCleanOnlyOnce;
|
CleanOnceCheckBox.Caption:=lisCleanOnlyOnce;
|
||||||
CleanOnceCheckBox.Hint:=lisAfterCleaningUpSwitchToAutomaticClean;
|
CleanOnceCheckBox.Hint:=lisAfterCleaningUpSwitchToAutomaticClean;
|
||||||
|
CleanCommonCheckBox.Caption:=lisCleanCommonFiles;
|
||||||
|
|
||||||
UpdateRevisionIncCheckBox.Caption := lisLazBuildUpdateRevInc;
|
UpdateRevisionIncCheckBox.Caption := lisLazBuildUpdateRevInc;
|
||||||
UpdateRevisionIncCheckBox.Hint := lisLazBuildUpdateRevisionInfoInAboutLazarusDialog;
|
UpdateRevisionIncCheckBox.Hint := lisLazBuildUpdateRevisionInfoInAboutLazarusDialog;
|
||||||
@ -1080,20 +1084,32 @@ procedure TConfigureBuildLazarusDlg.CopyProfileToUI(AProfile: TBuildLazarusProfi
|
|||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
LCLWidgetTypeComboBox.ItemIndex :=ord(AProfile.TargetPlatform);
|
CleanAutoRadioButton.OnClick:=Nil;
|
||||||
UpdateRevisionIncCheckBox.Checked :=AProfile.UpdateRevisionInc;
|
CleanCommonRadioButton.OnClick:=Nil;
|
||||||
TargetOSComboBox.Text :=AProfile.TargetOS;
|
CleanAllRadioButton.OnClick:=Nil;
|
||||||
TargetDirectoryComboBox.Text :=AProfile.TargetDirectory;
|
CleanCommonCheckBox.OnClick:=Nil;
|
||||||
TargetCPUComboBox.Text :=AProfile.TargetCPU;
|
try
|
||||||
case AProfile.IdeBuildMode of
|
LCLWidgetTypeComboBox.ItemIndex :=ord(AProfile.TargetPlatform);
|
||||||
bmBuild: CleanAutoRadioButton.Checked:=true;
|
UpdateRevisionIncCheckBox.Checked :=AProfile.UpdateRevisionInc;
|
||||||
bmCleanBuild: CleanCommonRadioButton.Checked:=true;
|
TargetOSComboBox.Text :=AProfile.TargetOS;
|
||||||
bmCleanAllBuild: CleanAllRadioButton.Checked:=true;
|
TargetDirectoryComboBox.Text :=AProfile.TargetDirectory;
|
||||||
|
TargetCPUComboBox.Text :=AProfile.TargetCPU;
|
||||||
|
case AProfile.IdeBuildMode of
|
||||||
|
bmBuild: CleanAutoRadioButton.Checked:=true;
|
||||||
|
bmCleanBuild: CleanCommonRadioButton.Checked:=true;
|
||||||
|
bmCleanAllBuild: CleanAllRadioButton.Checked:=true;
|
||||||
|
end;
|
||||||
|
CleanCommonCheckBox.Checked := AProfile.IdeBuildMode=bmCleanBuild;
|
||||||
|
CleanOnceCheckBox.Checked:=AProfile.CleanOnce;
|
||||||
|
OptionsMemo.Lines.Assign(AProfile.OptionsLines);
|
||||||
|
for i:=0 to DefinesListBox.Items.Count-1 do
|
||||||
|
DefinesListBox.Checked[i]:=AProfile.Defines.IndexOf(DefinesListBox.Items[i]) > -1;
|
||||||
|
finally
|
||||||
|
CleanAutoRadioButton.OnClick:=@CleanRadioButtonClick;
|
||||||
|
CleanCommonRadioButton.OnClick:=@CleanRadioButtonClick;
|
||||||
|
CleanAllRadioButton.OnClick:=@CleanRadioButtonClick;
|
||||||
|
CleanCommonCheckBox.OnClick:=@CleanCommonCheckBoxClick;
|
||||||
end;
|
end;
|
||||||
CleanOnceCheckBox.Checked:=AProfile.CleanOnce;
|
|
||||||
OptionsMemo.Lines.Assign(AProfile.OptionsLines);
|
|
||||||
for i:=0 to DefinesListBox.Items.Count-1 do
|
|
||||||
DefinesListBox.Checked[i]:=AProfile.Defines.IndexOf(DefinesListBox.Items[i]) > -1;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TConfigureBuildLazarusDlg.CopyUIToProfile(AProfile: TBuildLazarusProfile);
|
procedure TConfigureBuildLazarusDlg.CopyUIToProfile(AProfile: TBuildLazarusProfile);
|
||||||
@ -1227,13 +1243,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TConfigureBuildLazarusDlg.ShowHideCleanup(aShow: Boolean);
|
procedure TConfigureBuildLazarusDlg.ShowHideCleanup(aShow: Boolean);
|
||||||
|
// When target directory is read-only, hide Radiobuttons and show a single checkbox.
|
||||||
begin
|
begin
|
||||||
|
CleanAutoRadioButton.Visible:=aShow;
|
||||||
|
CleanCommonRadioButton.Visible:=aShow;
|
||||||
CleanAllRadioButton.Visible:=aShow;
|
CleanAllRadioButton.Visible:=aShow;
|
||||||
CleanOnceCheckBox.Visible:=aShow;
|
CleanOnceCheckBox.Visible:=aShow;
|
||||||
|
CleanCommonCheckBox.Visible:=not aShow;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TConfigureBuildLazarusDlg.CompileAdvancedButtonClick(Sender: TObject);
|
procedure TConfigureBuildLazarusDlg.CompileAdvancedButtonClick(Sender: TObject);
|
||||||
// mrOk=change selected profiles. Selected profiels will be saved or discarded
|
// mrOk=change selected profiles. Selected profiles will be saved or discarded
|
||||||
// depending on the calling dialog
|
// depending on the calling dialog
|
||||||
// mrYes=save and compile
|
// mrYes=save and compile
|
||||||
// mrCancel=do nothing
|
// mrCancel=do nothing
|
||||||
@ -1337,5 +1357,20 @@ begin
|
|||||||
ShowHideCleanup(not fBuilder.IsWriteProtected(fProfiles.Current));
|
ShowHideCleanup(not fBuilder.IsWriteProtected(fProfiles.Current));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TConfigureBuildLazarusDlg.CleanRadioButtonClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CleanCommonCheckBox.Checked:=CleanCommonRadioButton.Checked;
|
||||||
|
DebugLn(['TConfigureBuildLazarusDlg.CleanRadioButtonClick: set CleanCommonCheckBox to ', CleanCommonRadioButton.Checked]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TConfigureBuildLazarusDlg.CleanCommonCheckBoxClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CleanCommonCheckBox.Checked then
|
||||||
|
CleanCommonRadioButton.Checked:=True
|
||||||
|
else
|
||||||
|
CleanAutoRadioButton.Checked:=True;
|
||||||
|
DebugLn(['TConfigureBuildLazarusDlg.CleanCommonCheckBoxClick: set CleanCommonRadioButton to ', CleanCommonCheckBox.Checked]);
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user