mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 20:38:20 +02:00
Opkman: Rebuild IDE confirmation dialog goes in the background on gtk2.
git-svn-id: trunk@56113 -
This commit is contained in:
parent
b51815cfc0
commit
35d930c682
@ -143,6 +143,7 @@ type
|
|||||||
procedure tbUpdateClick(Sender: TObject);
|
procedure tbUpdateClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
FHintTimeOut: Integer;
|
FHintTimeOut: Integer;
|
||||||
|
FFormIsHiden: Boolean;
|
||||||
procedure EnableDisableControls(const AEnable: Boolean);
|
procedure EnableDisableControls(const AEnable: Boolean);
|
||||||
procedure SetupMessage(const AMessage: String = '');
|
procedure SetupMessage(const AMessage: String = '');
|
||||||
procedure SetupControls;
|
procedure SetupControls;
|
||||||
@ -161,6 +162,7 @@ type
|
|||||||
function UpdateP(const ADstDir: String; var ADoExtract: Boolean): TModalResult;
|
function UpdateP(const ADstDir: String; var ADoExtract: Boolean): TModalResult;
|
||||||
procedure StartUpdates;
|
procedure StartUpdates;
|
||||||
procedure StopUpdates;
|
procedure StopUpdates;
|
||||||
|
procedure Rebuild;
|
||||||
public
|
public
|
||||||
procedure ShowOptions(const AActivePageIndex: Integer = 0);
|
procedure ShowOptions(const AActivePageIndex: Integer = 0);
|
||||||
end;
|
end;
|
||||||
@ -235,9 +237,12 @@ end;
|
|||||||
|
|
||||||
procedure TMainFrm.FormShow(Sender: TObject);
|
procedure TMainFrm.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
SetupControls;
|
if not FFormIsHiden then
|
||||||
SetupColors;
|
begin
|
||||||
GetPackageList;
|
SetupControls;
|
||||||
|
SetupColors;
|
||||||
|
GetPackageList;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainFrm.GetPackageList(const ARepositoryHasChanged: Boolean = False);
|
procedure TMainFrm.GetPackageList(const ARepositoryHasChanged: Boolean = False);
|
||||||
@ -689,6 +694,15 @@ begin
|
|||||||
Updates.StartUpdate;
|
Updates.StartUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMainFrm.Rebuild;
|
||||||
|
begin
|
||||||
|
FFormIsHiden := True;
|
||||||
|
Self.Hide;
|
||||||
|
IDECommands.ExecuteIDECommand(Self, ecBuildLazarus);
|
||||||
|
Self.Show;
|
||||||
|
FFormIsHiden := False;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainFrm.tbUpdateClick(Sender: TObject);
|
procedure TMainFrm.tbUpdateClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
CanGo: Boolean;
|
CanGo: Boolean;
|
||||||
@ -752,11 +766,7 @@ begin
|
|||||||
SerializablePackages.MarkRuntimePackages;
|
SerializablePackages.MarkRuntimePackages;
|
||||||
VisualTree.UpdatePackageStates;
|
VisualTree.UpdatePackageStates;
|
||||||
if NeedToRebuild then
|
if NeedToRebuild then
|
||||||
begin
|
Rebuild;
|
||||||
EnableDisableControls(False);
|
|
||||||
IDECommands.ExecuteIDECommand(Self, ecBuildLazarus);
|
|
||||||
EnableDisableControls(True);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -866,11 +876,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if NeedToRebuild then
|
if NeedToRebuild then
|
||||||
begin
|
Rebuild;
|
||||||
EnableDisableControls(False);
|
|
||||||
IDECommands.ExecuteIDECommand(Self, ecBuildLazarus);
|
|
||||||
EnableDisableControls(True);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainFrm.tbInstallClick(Sender: TObject);
|
procedure TMainFrm.tbInstallClick(Sender: TObject);
|
||||||
@ -931,14 +937,8 @@ begin
|
|||||||
SerializablePackages.MarkRuntimePackages;
|
SerializablePackages.MarkRuntimePackages;
|
||||||
VisualTree.UpdatePackageStates;
|
VisualTree.UpdatePackageStates;
|
||||||
if (InstallStatus = isSuccess) or (InstallStatus = isPartiallyFailed) then
|
if (InstallStatus = isSuccess) or (InstallStatus = isPartiallyFailed) then
|
||||||
begin
|
|
||||||
if NeedToRebuild then
|
if NeedToRebuild then
|
||||||
begin
|
Rebuild;
|
||||||
EnableDisableControls(False);
|
|
||||||
IDECommands.ExecuteIDECommand(Self, ecBuildLazarus);
|
|
||||||
EnableDisableControls(True);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user