mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 20:21:12 +02:00
implemented IsUpdateLocked
git-svn-id: trunk@4111 -
This commit is contained in:
parent
1fadd7fafb
commit
a5f0ab0d3f
@ -1,6 +1,6 @@
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install
|
||||
the package GTKOpenGL 0.0.
|
||||
the package GTKOpenGL 1.0.
|
||||
}
|
||||
|
||||
unit GTKOpenGL;
|
||||
|
@ -310,7 +310,7 @@ var
|
||||
OldActivePage: String;
|
||||
begin
|
||||
if fUpdatingNotebook then exit;
|
||||
if IsUpdating then begin
|
||||
if IsUpdateLocked then begin
|
||||
fNoteBookNeedsUpdate:=true;
|
||||
exit;
|
||||
end;
|
||||
|
@ -109,7 +109,7 @@ type
|
||||
destructor Destroy; override;
|
||||
procedure BeginUpdate;
|
||||
procedure EndUpdate;
|
||||
function IsUpdating: boolean;
|
||||
function IsUpdateLocked: boolean;
|
||||
procedure UpdateAll;
|
||||
procedure UpdateTitle;
|
||||
procedure UpdateButtons;
|
||||
@ -711,7 +711,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TProjectInspectorForm.IsUpdating: boolean;
|
||||
function TProjectInspectorForm.IsUpdateLocked: boolean;
|
||||
begin
|
||||
Result:=FUpdateLock>0;
|
||||
end;
|
||||
|
@ -159,7 +159,7 @@ type
|
||||
procedure ClearButtons; virtual;
|
||||
procedure BeginUpdate(Change: boolean);
|
||||
procedure EndUpdate;
|
||||
function IsUpdating: boolean;
|
||||
function IsUpdateLocked: boolean;
|
||||
procedure ConsistencyCheck;
|
||||
function Count: integer;
|
||||
function GetPage(const APageName: string;
|
||||
@ -461,7 +461,7 @@ begin
|
||||
if FUpdateLock=0 then DoEndUpdate(fChanged);
|
||||
end;
|
||||
|
||||
function TBaseComponentPalette.IsUpdating: boolean;
|
||||
function TBaseComponentPalette.IsUpdateLocked: boolean;
|
||||
begin
|
||||
Result:=FUpdateLock>0;
|
||||
end;
|
||||
|
@ -312,25 +312,28 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
BeginUpdate(false);
|
||||
AFilename:=PkgLink.Filename;
|
||||
if not FileExists(AFilename) then exit;
|
||||
try
|
||||
XMLConfig:=TXMLConfig.Create(AFilename);
|
||||
NewPackage:=TLazPackage.Create;
|
||||
NewPackage.Filename:=AFilename;
|
||||
NewPackage.LoadFromXMLConfig(XMLConfig,'Package/');
|
||||
XMLConfig.Free;
|
||||
except
|
||||
on E: Exception do begin
|
||||
writeln('unable to read file "'+AFilename+'" ',E.Message);
|
||||
exit;
|
||||
AFilename:=PkgLink.Filename;
|
||||
if not FileExists(AFilename) then exit;
|
||||
try
|
||||
XMLConfig:=TXMLConfig.Create(AFilename);
|
||||
NewPackage:=TLazPackage.Create;
|
||||
NewPackage.Filename:=AFilename;
|
||||
NewPackage.LoadFromXMLConfig(XMLConfig,'Package/');
|
||||
XMLConfig.Free;
|
||||
except
|
||||
on E: Exception do begin
|
||||
writeln('unable to read file "'+AFilename+'" ',E.Message);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
if not NewPackage.MakeSense then exit;
|
||||
if PkgLink.Compare(NewPackage)<>0 then exit;
|
||||
// ok
|
||||
AddPackage(NewPackage);
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
if not NewPackage.MakeSense then exit;
|
||||
if PkgLink.Compare(NewPackage)<>0 then exit;
|
||||
// ok
|
||||
AddPackage(NewPackage);
|
||||
EndUpdate;
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
|
@ -81,7 +81,7 @@ type
|
||||
destructor Destroy; override;
|
||||
procedure BeginUpdate;
|
||||
procedure EndUpdate;
|
||||
function IsUpdating: boolean;
|
||||
function IsUpdateLocked: boolean;
|
||||
procedure UpdateAll;
|
||||
procedure UpdateTree;
|
||||
procedure UpdateList;
|
||||
@ -507,14 +507,14 @@ begin
|
||||
if FChangedDuringLock then UpdateAll;
|
||||
end;
|
||||
|
||||
function TPkgGraphExplorer.IsUpdating: boolean;
|
||||
function TPkgGraphExplorer.IsUpdateLocked: boolean;
|
||||
begin
|
||||
Result:=FUpdateLock>0;
|
||||
end;
|
||||
|
||||
procedure TPkgGraphExplorer.UpdateAll;
|
||||
begin
|
||||
if IsUpdating then begin
|
||||
if IsUpdateLocked then begin
|
||||
FChangedDuringLock:=true;
|
||||
exit;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user