mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:59:11 +02:00
IDE: Disable Build-buttons in Configure Build Lazarus dlg when the IDE already compiles. Issue #26884.
This commit is contained in:
parent
b1e6affa83
commit
e17301cab0
@ -154,6 +154,7 @@ type
|
|||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure CopyProfileToUI(AProfile: TBuildLazarusProfile);
|
procedure CopyProfileToUI(AProfile: TBuildLazarusProfile);
|
||||||
procedure CopyUIToProfile(AProfile: TBuildLazarusProfile);
|
procedure CopyUIToProfile(AProfile: TBuildLazarusProfile);
|
||||||
|
procedure DisableCompilation;
|
||||||
procedure UpdateProfileNamesUI;
|
procedure UpdateProfileNamesUI;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -196,7 +197,8 @@ type
|
|||||||
function PrepareTargetDir(Flags: TBuildLazarusFlags): TModalResult;
|
function PrepareTargetDir(Flags: TBuildLazarusFlags): TModalResult;
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
function ShowConfigureBuildLazarusDlg(AProfiles: TBuildLazarusProfiles): TModalResult;
|
function ShowConfigBuildLazDlg(AProfiles: TBuildLazarusProfiles;
|
||||||
|
ADisableCompilation: Boolean): TModalResult;
|
||||||
function MakeLazarus(Profile: TBuildLazarusProfile; Flags: TBuildLazarusFlags): TModalResult;
|
function MakeLazarus(Profile: TBuildLazarusProfile; Flags: TBuildLazarusFlags): TModalResult;
|
||||||
function IsWriteProtected(Profile: TBuildLazarusProfile): Boolean;
|
function IsWriteProtected(Profile: TBuildLazarusProfile): Boolean;
|
||||||
function SaveIDEMakeOptions(Profile: TBuildLazarusProfile; Flags: TBuildLazarusFlags): TModalResult;
|
function SaveIDEMakeOptions(Profile: TBuildLazarusProfile; Flags: TBuildLazarusFlags): TModalResult;
|
||||||
@ -235,7 +237,8 @@ begin
|
|||||||
fMacros:=GlobalMacroList;
|
fMacros:=GlobalMacroList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLazarusBuilder.ShowConfigureBuildLazarusDlg(AProfiles: TBuildLazarusProfiles): TModalResult;
|
function TLazarusBuilder.ShowConfigBuildLazDlg(AProfiles: TBuildLazarusProfiles;
|
||||||
|
ADisableCompilation: Boolean): TModalResult;
|
||||||
// mrOk=save
|
// mrOk=save
|
||||||
// mrYes=save and compile
|
// mrYes=save and compile
|
||||||
// mrAll=save and compile all selected profiles
|
// mrAll=save and compile all selected profiles
|
||||||
@ -247,6 +250,8 @@ begin
|
|||||||
try
|
try
|
||||||
ConfigBuildLazDlg.fBuilder := Self;
|
ConfigBuildLazDlg.fBuilder := Self;
|
||||||
ConfigBuildLazDlg.fProfiles.Assign(AProfiles); // Copy profiles to dialog.
|
ConfigBuildLazDlg.fProfiles.Assign(AProfiles); // Copy profiles to dialog.
|
||||||
|
if ADisableCompilation then
|
||||||
|
ConfigBuildLazDlg.DisableCompilation;
|
||||||
Result := ConfigBuildLazDlg.ShowModal;
|
Result := ConfigBuildLazDlg.ShowModal;
|
||||||
if Result in [mrOk,mrYes,mrAll] then
|
if Result in [mrOk,mrYes,mrAll] then
|
||||||
AProfiles.Assign(ConfigBuildLazDlg.fProfiles); // Copy profiles back from dialog.
|
AProfiles.Assign(ConfigBuildLazDlg.fProfiles); // Copy profiles back from dialog.
|
||||||
@ -1228,6 +1233,12 @@ begin
|
|||||||
AProfile.Defines.Add(DefinesListBox.Items[i]);
|
AProfile.Defines.Add(DefinesListBox.Items[i]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TConfigureBuildLazarusDlg.DisableCompilation;
|
||||||
|
begin
|
||||||
|
CompileButton.Enabled:=False;
|
||||||
|
CompileAdvancedButton.Enabled:=False;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TConfigureBuildLazarusDlg.UpdateProfileNamesUI;
|
procedure TConfigureBuildLazarusDlg.UpdateProfileNamesUI;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
@ -4864,7 +4864,8 @@ begin
|
|||||||
fBuilder:=TLazarusBuilder.Create; // Will be freed in the very end.
|
fBuilder:=TLazarusBuilder.Create; // Will be freed in the very end.
|
||||||
MainBuildBoss.SetBuildTargetIDE;
|
MainBuildBoss.SetBuildTargetIDE;
|
||||||
try
|
try
|
||||||
DlgResult:=fBuilder.ShowConfigureBuildLazarusDlg(MiscellaneousOptions.BuildLazProfiles);
|
DlgResult:=fBuilder.ShowConfigBuildLazDlg(MiscellaneousOptions.BuildLazProfiles,
|
||||||
|
ToolStatus in [itDebugger,itBuilder]);
|
||||||
finally
|
finally
|
||||||
MainBuildBoss.SetBuildTargetProject1(true);
|
MainBuildBoss.SetBuildTargetProject1(true);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user